【问题标题】:How to fix the open_basedir restriction error? [duplicate]如何修复 open_basedir 限制错误? [复制]
【发布时间】:2011-01-27 21:21:14
【问题描述】:

可能重复:
open_basedir restriction in effect. File(/) is not within the allowed path(s):

我有一个名为 dataface 的脚本,在共享主机上它一直输出此警告

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. 
File(/usr/local/lib/php/Dataface/FormTool/text.php) is not within the allowed path(s):
 (/home/:/usr/lib/php:/tmp) in /home/a4385243/public_html/dataface/Dataface/FormTool.php on line 654

我该如何解决这个问题?

【问题讨论】:

    标签: php debugging


    【解决方案1】:

    open_basedir 是一个限制访问 PHP 脚本的某些目录的设置。

    您没有包含脚本中引发错误的行,但如果我不得不猜测,我会说您的脚本包含 Dataface/FormTool/text.php 不知何故错误(可能必须是 ../Dataface.... 或某物)。

    然后PHP 开始在include_path 中搜索文件并被open_basedir 限制停止。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-03-11
      • 1970-01-01
      • 2013-01-06
      • 2011-05-09
      • 1970-01-01
      • 2017-10-11
      • 2015-06-08
      • 1970-01-01
      相关资源
      最近更新 更多