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 ...
随机推荐
- 面试必问之http以及浏览器相关知识
/** 1.HTTP以及HTTPS概念 HTTP是超文本传输协议,是一个用于传输超媒体文档的应用层协议,被用于在web浏览器和网站服务器之间,以明文方式传递信息, 不提供任何方式的饿数据加密,因此使用 ...
- Java基础三(2020.1.15)
学习内容: 1.Java流程控制之循环结构 2.Java数组 3.Java方法 1.随机数:math.random()得到0-1之间的数 math.random()*10+1得到1-10之间的 ...
- AQS: 什么是AQS?
AQS定义了一套多线程访问共享资源的同步器框架. 许多同步类实现都依赖于它,如常用的ReentrantLock/ReentrantReadWriterLock/CountDownLatch这些类里面都 ...
- 吴裕雄--天生自然 pythonTensorFlow图形数据处理:图像预处理完整样例
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt #随机调整图片的色彩,定义两种顺序. def di ...
- ios 接入微信开发 新版
首先在服务器所在域名(https://www.test.com)根目录创建apple-app-site-association文件 { "applinks": { "ap ...
- 再来看看Java的新特性——其他新特性
关于剩余Java8新特性知识点总结,包含:默认方法.Optional.CompletableFuture.时间相关. 默认方法 默认方法皆在帮助Java新功能可以兼容低版本JDK已开发的程序. 比如说 ...
- 学习4412开发板gdb和gdbserver的调试
因为有很多的小伙伴是从单片机转过来的,用惯了单片机上的JLINK调试程序,换到Linux上非常的不习惯.确实,如果能设置断点,单步调试,查看变量,那确实是太爽了,那么在我们的Linux可以做到吗,答案 ...
- 自定义字段从BOM带入生产用料清单
自定义字段从BOM带入生产用料清单
- winform 界面加载慢原因分析
公司新来的开发人员,对winform开发还不是特别精通,在做个性化界面体验的时候容易出现闪烁和加载慢 闪烁的话,通过winform窗体的双缓存来解决在form 窗体中增加如下代码 protected ...
- java作业-----方法重载
满足方法重载的条件:1.方法名相同 2.参数类型不同,参数个数不同,参数类型的顺序不同. 同时,方法的返回值不作为方法重载的判断条件.