...
PHP

PHP Nginx TP5 出现 require(): open_basedir restriction in effect /:/tmp/:/proc/ 报错

在linux服务器部署thinkphp5的时候PHP报了这个错误

个人轻身经历 下面放出解决办法

方法一、.user.ini

在网站根目录找到.user.ini 没有的话 打开隐藏文件 .xxx 开头的再liunx中是隐藏文件
可以尝试删除.user.ini(记得备份)如果删除了也解决不了继续往下看
打开.user.ini文件修改文件路径如下:

open_basedir=/home/wwwroot/网站路径/:/tmp/:/proc/

如果还是解决不了 改成下面的试试

open_basedir=/home/wwwroot/网站路径/../:/tmp/:/proc/

方法二

shell 打开目录

cd /usr/local/nginx/conf

vim编辑fastcgi.conf

vim fastcgi.conf

找到

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

修改为

astcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/../:/tmp/:/proc/";

问题解决

PS:记得重启服务

nodejs 获取命令行参数 vue-clipboard2(vue剪切板功能)
biu biu biu
MacStroke下载及appleScript 模拟按键脚本 共享打印机0x0000011b修复的另一种方法 yarn 设置淘宝镜像 yarn 错误There appears to be trouble with your network connection. Retrying... win11 安装限制去除 跳过TPM CPU检测 附软件 win11 桌面不满足要求水印去除 适用于跳过TPM CPU检测安装后的桌面水印