zoukankan      html  css  js  c++  java
  • 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即可。

  • 相关阅读:
    BZOJ 3064 Tyvj 1518 CPU监控
    JS 省市区级联 修改地址操作时的默认选中方法
    《deetom》项目开发历程<五> PHP邮件
    input type = "image" 造成提交表单
    三元表达式
    二进制计算题
    关于 原码 反码 补码 位运算
    JS 返回
    google 二位码API
    ECLIPSE 集成 PHP开发环境
  • 原文地址:https://www.cnblogs.com/godfather007/p/11007852.html
Copyright © 2011-2022 走看看