Skip to content


wordpress open_basedir restriction in effect问题

nginx-0.8.46
php-5.2.14
mysql-5.1.37
eaccelerator-0.9.6.1
wordpress 为官方3.0英文版

安装后在页面出现错误信息

Warning: require() [function.require]: open_basedir restriction in effect. File() is not within the allowed path(s): (/opt/htdocs:/opt/lampp/htdocs:/opt/php/lib/php:/tmp/session:/tmp/upload) in /opt/lampp/htdocs/wordpress/wp-settings.php on line 132

php.ini 中的配置也没错

open_basedir = “/opt/htdocs:/opt/lampp/htdocs:/opt/php/lib/php:/tmp/session:/tmp/upload”

关闭open_basedir或去掉[eaccelerator]之后不会报错,安全起见open_basedir一定要开,eaccelerator换成0.9.5.3后没问题了。


tar jxvf eaccelerator-0.9.5.3.tar.bz2
cd eaccelerator-0.9.5.3/
/opt/php/bin/phpize
./configure –enable-eaccelerator=shared –with-php-config=/opt/php/bin/php-config
make
make install

参考:
http://linux.chinaunix.net/bbs/redirect.php?tid=1162653&goto=lastpost

Posted in PHP, 技术.

Tagged with , , .


One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. 死灰 says

    军火库。。。我怎么经常走进来这里查东西。楼主的东西写的不错。蛮多东西都很有用



Some HTML is OK

or, reply to this post via trackback.