Warning: require(): open_basedir restriction in effect.

Warning: require(): open_basedir restriction in effect. File(/home/wwwroot/default/1211/bootstrap/autoload.php) is not within the allowed path(s): (/home/wwwroot/default/1211/public/:/tmp/:/proc/) in /home/wwwroot/default/1211/public/index.php on line 22
出现这个问题的原因是由于lnmp配置的时候fastcgi.conf配置PHP_ADMIN_VALUE为”open_basedir=$document_root/:/tmp/:/proc/”,而且在配置虚拟主机的时候fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 就会指定到你配置的路径中,如下:
listen 80;
        server_name dingdang.com;
        index index.html index.htm index.php;
        root  /home/wwwroot/default/dateApi/public;
        #deny download when you open some file
        include enable-php.conf;

fastcgi.conffastcgi_param PHP_ADMIN_VALUE "open_basedir=/home/wwwroot/default/1211/public/:/tmp/:/proc/"; 中的/home/wwwroot/default/1211/public/ 改成/home/wwwroot/ 就可以了,同时注释掉php.ini中的open_basedir;

以上问题是我出现过的,问题一样,但是,路径是网上另一位同仁的,
我是这样修改和理解的,如有异议,请在下方留言,共同讨论

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值