0
点赞
收藏
分享

微信扫一扫

使用lamp一件安装包 遇到is not within the allowed path(s)的问题

狐沐说 2022-04-06 阅读 60


报错信息:

string(174) "file_exists(): open_basedir restriction in effect. File(/data/xxx/xxx.index) is not within the allowed path(s): (/data/xxx/default/:/tmp/:/proc/:/data/xxx)"



主要问题就是,File(/data/tntsearch/stickers.index) is not within the allowed path(s)

1.首先排查了下php.ini 配置文件里面的open_basedir,发现压根没有开启;

2.其次排查了下目录下的.user.ini文件,发现也没问题

3.最后怀疑是一键安装包的问题,经排查发现,nginx软件目录下的fastcgi.conf找到了这一行

fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";


4.解决办法就是新增目录到这个参数里面,示例如下:

fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/:/data/xxx";





举报

相关推荐

0 条评论