我已经移动我的网站到另一个主机服务器。但是,fopen()函数有一个小问题。每次运行时,都会导致以下错误:
警告: file_exists() function.file-exists:open_basedir限制生效。File(/home/www-virtual/www-username/www/bindata/gallery/GAL34e81b4adce22091c6ee31c71055e181.jpg)不在允许的路径内(S):(/www/default/www:/www/username_www:/tmp:/usr/local/lib/php:/usr/local/php-5.2/lib) in /www/username_www/www/frontend/gallery/GalleryPage.php5,在第112行
我不能对PHP脚本做任何事情,因为它是ionCube编码的。
那还能做什么呢?
发布于 2011-10-28 12:38:39
现在就改变托管公司!
如果他们不能正确配置open_basedir,谁知道等待中还有什么可怕的事情(是的,对他们来说,实行全面限制是有效的--但如果是这样的话,为什么他们在白名单中包含了其他人的dir )。
发布于 2011-10-28 12:13:06
一个可能的答案(来自堆栈溢出)是在.htaccess文件中为PHP的开式碱基设置一个异常
<Directory /var/www/vhosts/domain.tld/httpdocs>
php_admin_value open_basedir "/var/www/vhosts/domain.tld/httpdocs:/var/www/vhosts/domain.tld/zend"
</Directory>您还可以完全取消对
<Directory /var/www/vhosts/domain.tld/httpdocs>
php_admin_value open_basedir none
</Directory>https://serverfault.com/questions/325645
复制相似问题