zoukankan      html  css  js  c++  java
  • 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. File() is not within the allowed path(s)), 在网上查找说这是eaccelerator的一个BUG所导致,解决方法有以下几种:

    1.在解压eaccelerator后修改eaccelerator-0.9.6/eaccelerator.c文件1156行的参数,如下:
    if (PG(open_basedir) && php_check_open_basedir(realname TSRMLS_CC)) { 
    修改成: 
    if (PG(open_basedir) && php_check_open_basedir(file_handle->filename TSRMLS_CC)) { 
    修改完成后再安装。 
    2.在编译eAccelerator的时候增加 "--without-eaccelerator-use-inode" 参数 
    /usr/local/bin/phpize 
    ./configure --with-php-config=/usr/local/bin/php-config 
     
    以上两种方法测试通过。作为记录。 
  • 相关阅读:
    洛谷 P6622
    洛谷 P6619
    LOJ 3188
    CF::Gym 102174G
    eJOI2017~2019
    洛谷 P6313
    洛谷 P6305
    JSOI2020 酱油记
    洛谷 P6234
    CodeForces 1334F
  • 原文地址:https://www.cnblogs.com/qiandu/p/5133679.html
Copyright © 2011-2022 走看看