zhiyi_cai 发表于 2017-6-2 05:45:40

Php 报错 请问一下如何可以解决这个问题?

WARNING: child 3097 said into stderr: "NOTICE: PHP message: PHP Warning:realpath(): open_basedir restriction in effect. File(/www/web/magento/pub) is not within the allowed path(s): (/home/wwwroot/default/:/tmp/:/proc/) in /www/web/magento/pub/index.php on line 13"
WARNING: child 3097 said into stderr: "NOTICE: PHP message: PHP Warning:require(): open_basedir restriction in effect. File(/../app/bootstrap.php) is not within the allowed path(s): (/home/wwwroot/default/:/tmp/:/proc/) in /www/web/magento/pub/index.php on line 13"
WARNING: child 3097 said into stderr: "NOTICE: PHP message: PHP Warning:require(/../app/bootstrap.php): failed to open stream: Operation not permitted in /www/web/magento/pub/index.php on line 13"
WARNING: child 3097 said into stderr: "NOTICE: PHP message: PHP Fatal error:require(): Failed opening required '/../app/bootstrap.php' (include_path='.:/usr/local/php/lib/php') in /www/web/magento/pub/index.php on line 13"


Php 报错 请问一下如何可以解决这个问题?

解决了!
解决方法!
1.4上不需要放跨目录还需要将/usr/local/nginx/conf/fastcgi.conf 里面的fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";删除

参考帖子
https://bbs.vpser.net/viewthread.php?tid=15259&highlight=open%5C_basedir

[ 本帖最后由 zhiyi_cai 于 2017-6-2 06:36 编辑 ]

licess 发表于 2017-6-2 08:42:15

LNMP 1.4上也可以直接使用lnmp1.4/tools/ 目录下的 ./remove_open_basedir_restriction.sh 进行移除该设置。
页: [1]
查看完整版本: Php 报错 请问一下如何可以解决这个问题?