【问题标题】:open_basedir restriction warnings in WordpressWordpress 中的 open_basedir 限制警告
【发布时间】:2015-10-04 21:20:59
【问题描述】:

我在wp-admin 的wordpress 备份数据库中遇到了这个问题。我该如何解决?

警告:file_exists() [function.file-exists]:open_basedir 限制生效。 文件(E:\Inetpub\vhosts\churrascaria-gaucho.com\httpdocs/.maintenance) 不在允许的路径内: (E:/Inetpub/vhosts/churrascaria-gaucho.com\;C:\Windows\Temp) 在 E:\Inetpub\vhosts\churrascaria-gaucho.com\httpdocs\wp-includes\load.php 在第 146 行

警告:无法修改标头信息 - 标头已由(输出开始于 E:\Inetpub\vhosts\churrascaria-gaucho.com\httpdocs\wp-includes\load.php:146) 在 E:\Inetpub\vhosts\churrascaria-gaucho.com\httpdocs\wp-includes\pluggable.php 881行

【问题讨论】:

    标签: php wordpress


    【解决方案1】:

    open_basedir 函数定义允许 PHP 使用 fopen() 和 gzopen() 等函数访问文件的位置或路径。如果文件在 open_basdir 定义的路径之外,PHP 将拒绝打开它。这就是您收到此警告的原因。您可以在 Apache 配置文件 httpd.conf 中关闭 open basedir 限制,使用以下行:php_admin_value open_basedir none

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-09-27
      • 1970-01-01
      • 2011-07-15
      • 2015-03-30
      • 1970-01-01
      • 1970-01-01
      • 2015-03-06
      相关资源
      最近更新 更多