“open_basedir限制有效”但文件是正确的目录 [英] "open_basedir restriction in effect" but file is in the correct dir

查看:1808
本文介绍了“open_basedir限制有效”但文件是正确的目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将一些网站移动到新服务器(运行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 in C:\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 the open_basedir value to none 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 in index.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 the www folder to the include path without any luck.

解决方案

AFAIK there has been a problem in Plesk with disabling open_basedir on Windows. Try to delete open_basedir key from registry

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\PHP\Per Directory Values\C\Inetpub\vhosts\yourdomain.com\httpdocs

这篇关于“open_basedir限制有效”但文件是正确的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆