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

报错信息:

 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";
原文地址:https://www.cnblogs.com/joshua317/p/14663365.html