“open_basedir限制有效”但文件是正确的目录 [英] "open_basedir restriction in effect" but file is in the correct dir
问题描述
我正在尝试将一些网站移动到新服务器(运行Plesk 11)并且我收到以下错误:
警告:file_exists()[function.file-exists]:open_basedir限制生效。文件(configuration.php)不在允许的路径中:(C:\ Inetpub \vhosts \ domain.com \ domain \ domain.com \\\\; C:\ Windows \\ \\ temp)在
C:\ Inetpub \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ blockquote>
但
configuration.php
文件位于C:\ Inetpub \vhosts \ domain.com\domains\domain.com\\\\
!
我几乎要疯了,因为这绝对没有对我有意义。
我甚至可以将open_basedir
值设置为无
并仍然得到同样的错误。
使用PHP 5.2或5.3也一样。
唯一能让我更进一步的是设置一个
dirname(__ FILE __)
在第18行的index.php
中的电话会议前,但这不是解决办法,因为我不能更改整个CMS中的所有文件引用。因此我还试图将www
文件夹添加到包含路径中,但没有任何运气。解决方案AFAIK Plesk出现问题,在Windows上禁用
open_basedir
。尝试从注册表中删除open_basedir
键HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node\PHP \Per Directory Values\C\Inetpub\vhosts\yourdomain.com\httpdocs
I am trying to move some sites to a new server (running Plesk 11) and I am getting the following Error:
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(configuration.php) is not within the allowed path(s): (C:\Inetpub\vhosts\domain.com\domains\domain.com\www\;C:\Windows\Temp) in C:\Inetpub\vhosts\domain.com\domains\domain.com\www\index.php on line 18
But the
configuration.php
file is inC:\Inetpub\vhosts\domain.com\domains\domain.com\www\
!I am nearly getting crazy here as this makes absolutely no sense to me.
I can even set theopen_basedir
value tonone
and still get the same error.
Same also for using PHP 5.2 or 5.3.The only thing which got me a little bit further was setting a
dirname(__FILE__)
in front of the call inindex.php
on line 18, but this is no solution as I can't alter all file references in the whole CMS. Because of this I also tried to add thewww
folder to the include path without any luck.解决方案AFAIK there has been a problem in Plesk with disabling
open_basedir
on Windows. Try to deleteopen_basedir
key from registryHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\PHP\Per Directory Values\C\Inetpub\vhosts\yourdomain.com\httpdocs
这篇关于“open_basedir限制有效”但文件是正确的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!