Unknown: o pen_basedir restriction in effect. File(XXX) is not within the allo wed path(s): (XXX:/tmp/:/proc/) in Unknown on line 0报错解决
报错:
[error] 12321#0: *92386 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(XXX) is not within the allowed path(s): (XXX:/tmp/:/proc/) in Unknown on line 0
PHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Unable to open primary script: XXX/index.php (Operation not permitted)" while reading response header from upstream, client: 221.232.69.252, server: XXX, request: "GET /api/zdfenbu HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "XXX"
解决:
有两种方法,需要跟自己的实际情况来选择使用哪一种
1.vim fastcgi.conf
将fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";一行注释,再执行nginx -s reload即可。
2.vim fastcgi.conf
将fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";一行改为fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/../:/tmp/:/proc/";再执行nginx -s reload即可。
Unknown: o pen_basedir restriction in effect. File(XXX) is not within the allo wed path(s): (XXX:/tmp/:/proc/) in Unknown on line 0报错解决的更多相关文章
- open_basedir restriction in effect. File() is not within the allowed path(s)
目前发现eaccelerator安装之后如果php.ini中设置open_basedir将导致open_basedir的一些报错(open_basedir restriction in effect. ...
- thinkPHP5配置nginx环境无法打开(require(): open_basedir restriction in effect. File(/mnt/hgfs/root/tp5/thinkphp/start.php) is not within the allowed path(s)
今天想把玩一下tp5,结果怎么都无法访问,每次都是报500错误,我把错误提示都打开看到下面的错误 require(): open_basedir restriction in effect. File ...
- Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/../thinkphp/start.php) is not within the allowed path(s):
Warning: require(): open_basedir restriction in effect. File(/www/wwwroot//../thinkphp/start.php) is ...
- require(): open_basedir restriction in effect. File
新安装的 lnmp 环境,将项目放上报 require(): open_basedir restriction in effect. File 的错误! 错误日志显示,访问脚本不在 open_base ...
- sysctl -P 报错解决办法 error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown keyerror: "net.bridge.brid ...
- Archive required for library “xxx” cannot be read or is not a valid zip file报错解决
在项目中导入别人的maven项目时报错:Archive required for library “xxx” cannot be read or is not a valid zip file 网上查 ...
- 报错解决——linux下执行sh出现异常"syntax error: unexpected end of file"
有时我们在linux下执行一个sh文件,会报错“SYNTAX ERROR:UNEXPECTED END OF FILE”,这个现象主要是工作的系统环境改变造成的. 若最初脚本中是在windows下,使 ...
- Windows下nginx报错解决:CreateFile() "xxx/logs/nginx.pid" failed
写在前面 本文给出Windows下nginx报错:CreateFile() "xxx/logs/nginx.pid" failed 的解决方法并分析了出错原因,其中 xxx 表示n ...
- nfs客户端报错解决Stale file handle
NFS故障: 场景:客户端挂载是好的.服务端磁盘满了,重新给挂了一快.客户端df -h nfs挂载消失. 客户端报错:Stale file handle 现象如下: [root@test63-spri ...
随机推荐
- log4j2和logback动态修改日志级别工具类
工作中,在排查线上问题时,有以下场景在不重新部署或重启服务的情况下,需要动态调整线上日志级别 1.线上有些日志打印过多干扰有用的日志,需要动态修改线上日志记录器的打印日志级别,调高一些日志级别,打印出 ...
- 单个body|简单解释|复杂解释|反面解释
单个body有三种方法简单解释.复杂解释和反面解释 ========================================================================== ...
- Linux-编写简单守护进程
1.任何一个进程都可以将自己实现成一个守护进程 2.create_daemon函数要素 (1).子进程要等待父进程退出 (2).子进程使用setsid创建新的会话期,脱离控制台 (3).调用chdir ...
- python-day4爬虫基础之正则表达式
正则表达式:(字符串匹配) 使用单个字符串来描述匹配一系列符合某个句法规则的字符串 是对字符串操作的一种逻辑公式 应用场景:处理文本和数据 正则表达式过程:依次拿出表达式和文本中的字符比较,如果每一个 ...
- 决策树分类回归,ID3,c4.5,CART,及其Python代码
决策树模型 内部节点表示一个特征或者属性,叶子结点表示一个类.决策树工作时,从根节点开始,对实例的每个特征进行测试,根据测试结果,将实例分配到其子节点中,这时的每一个子节点对应着特征的一个取值,如此递 ...
- django的认证演变过程分析
认证规则图: django不分离 drf分类 认证规则演变图 数据库session认证:低效 缓存认证:高效 jwt认证:高效 缓存认证:不易并发 jwt认证:易并发
- windows下快速安装tensorflow
下载安装文件 https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/ 配置pip参数文件 [global] index-url = https://mi ...
- 吴裕雄--天生自然 pythonTensorFlow图形数据处理:TensorFlow图像处理函数
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt #读取图片 image_raw_data = tf ...
- push 空内容push入数组会占位
#!/usr/bin/perl use strict; use warnings; ==)?:'';my @arr; ==)?:''; '; my $line = join "|" ...
- 关于 Xpath 定位
关于 Xpath 定位 问: // 和 / 的区别 表达式 描述 nodename 选取此节点的所有子节点. / 从根节点选取. // 从匹配选择的当前节点选择文档中的节点,而不考虑它们的位置. . ...