A-A+

Centos下LNMPA安装Magento2提示is_dir(): open_basedir restriction in effect. File(/etc/pki/tls/certs) is not within the allowed path(s):..

2016年09月16日 灵犀一指 Centos下LNMPA安装Magento2提示is_dir(): open_basedir restriction in effect. File(/etc/pki/tls/certs) is not within the allowed path(s):..已关闭评论 阅读 763 人 次

这两天调试Magento2,在Centos7下面使用了LNMP1.3-full安装包,安装Magento的时候提示找不到PHP版本,且提示:提示is_dir(): open_basedir restriction in effect. File(/etc/pki/tls/certs) is not within the allowed path(s):..,一堆吧啦啦啦的,按照下面方法操作就可以,其他的方法,仅是让你在php.ini中添加代码,对我不好使,只有下面这个可以:
第一步:
curl-config --ca
#output: /etc/ssl/certs/ca-certificates.crt

第二步:
ls -halt /etc/ssl/certs/ca-certificates.crt
#output: [...] /etc/ssl/certs/ca-certificates.crt -> ../../ca-certificates/extracted/tls-ca-bundle.pem

第三步:
sudo mkdir -p /etc/pki/tls/certs
sudo ln -s /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-certificates.crt
sudo vi /etc/php/php.ini
#add following lines to "open_basedir" configuration section
# :/etc/pki/tls/certs:/etc/ssl/certs

第三步实际上就是在Apache conf文件下的Vhost中domain.conf中添加包含代码:
php_admin_value open_basedir "/etc/pki/tls/certs:/etc/ssl/certs:
重启Apache,OK!

标签:

评论已关闭!