报错:
[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报错解决的更多相关文章

  1. 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. ...

  2. 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 ...

  3. 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 ...

  4. require(): open_basedir restriction in effect. File

    新安装的 lnmp 环境,将项目放上报 require(): open_basedir restriction in effect. File 的错误! 错误日志显示,访问脚本不在 open_base ...

  5. 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 ...

  6. 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 网上查 ...

  7. 报错解决——linux下执行sh出现异常"syntax error: unexpected end of file"

    有时我们在linux下执行一个sh文件,会报错“SYNTAX ERROR:UNEXPECTED END OF FILE”,这个现象主要是工作的系统环境改变造成的. 若最初脚本中是在windows下,使 ...

  8. Windows下nginx报错解决:CreateFile() "xxx/logs/nginx.pid" failed

    写在前面 本文给出Windows下nginx报错:CreateFile() "xxx/logs/nginx.pid" failed 的解决方法并分析了出错原因,其中 xxx 表示n ...

  9. nfs客户端报错解决Stale file handle

    NFS故障: 场景:客户端挂载是好的.服务端磁盘满了,重新给挂了一快.客户端df -h nfs挂载消失. 客户端报错:Stale file handle 现象如下: [root@test63-spri ...

随机推荐

  1. 第二季第十一天 html5语义化标签 css透明度

    span不能设置宽高背景 HTML5语义化标签 <section>标签所包裹的是有一组相似的主题的内容,可以用这个标签来实现文章的章节.标签式对话框中的各种标签页等类似的功能. <s ...

  2. Django专题-ugettext_lazy

    标准翻译 使用函数 ugettext() 来指定一个翻译字符串. 作为惯例,使用短别名 _ 来引入这个函数以节省键入时间. 在下面这个例子中,文本 "Welcome to my site&q ...

  3. Python执行JS -- PyExecJS库

    pip install PyExecJS 查看执行JS的环境 print(execjs.get().name) 返回值:JScript windows 默认执行JS的环境 返回值:Node.js (V ...

  4. 【python】两行代码实现近百年的正反日期查询--20200202

    到2020年了.有个日期也火了,记得上一次还是2011年11月2日.为啥捏,因为日期写成数字形式 正反是一样的. 2020年也有一个这样的日期.20200202:2020年2月2日. 于是乎想写一段代 ...

  5. elasticsearch 大集群,双重别名,滚动更新分词方案

    elasticsearch 滚动更新分词 国内用ik.hanlp.ansj或基于其二次开发的比较多 必然有分词变更的操作(主要是是加词) reindex+别名可以解决一部分问题,但在大集群上会影响业务 ...

  6. 如何在linux中运行sql文件

    1.在linux中进入sql命令行 mysql -u root -p   输入密码 2.假设home下面有a.sql文件 先得use databasename,要不会报错 “No Database S ...

  7. 数学是什么?_题跋—>数学是什么?

    题跋—>数学是什么? 数学的定义在不同的解释中有不同的释义,它又像是哲学.又像是逻辑性:即研究数量关系.有研究结构和空间关系等等.因此很难给予一个非常准确的定义,正因为如此数学是渗透于生活的各个 ...

  8. iOS 类似外卖 两个tableView联动

    在伯乐在线上看到一个挺好玩的文章,自己也参考文章实现了一下. 效果实现如图所示: 具体实现的内容可以参考原文,参考文章:<iOS 类似美团外卖 app 两个 tableView 联动效果实现&g ...

  9. Codeforces Round #576 (Div. 2) D. Welfare State

    http://codeforces.com/contest/1199/problem/D Examples input1 output1 input2 output2 Note In the firs ...

  10. 自定义字段从BOM带入生产用料清单

    自定义字段从BOM带入生产用料清单