VPS侦探论坛

 找回密码
 注册
查看: 3168|回复: 1

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

[复制链接]
发表于 2017-6-2 05:45:40 | 显示全部楼层 |阅读模式

[02-Jun-2017 05:40:19] WARNING: [pool www] 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"
[02-Jun-2017 05:40:19] WARNING: [pool www] 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"
[02-Jun-2017 05:40:19] WARNING: [pool www] 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"
[02-Jun-2017 05:40:19] WARNING: [pool www] 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 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-6-2 08:42:15 | 显示全部楼层


LNMP 1.4上也可以直接使用lnmp1.4/tools/ 目录下的 ./remove_open_basedir_restriction.sh 进行移除该设置。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-17 19:03 , Processed in 0.025648 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表