支持 » 插件 » 生成百度地图和设置固定链接时显示权限不够

  • 您好,我的程序是 WordPress 3.5.1,现在出现一个这样的问题(我联系了空间服务商,他们说配置时正常的,要我联系程序开发员,所以特意来求助)

    我利用Baidu Sitemap在生成百度地图时,出现代码:Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home1/vhost/vh556830:/home1/vhost/vh556830/temp/:/tmp/expl/:/tmp/) in /home1/vhost/vh556830/www/runshengyf/wp-content/plugins/baidu-sitemap-generator/sitemap-function.php on line 195
    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home1/vhost/vh556830:/home1/vhost/vh556830/temp/:/tmp/expl/:/tmp/) in /home1/vhost/vh556830/www/runshengyf/wp-content/plugins/baidu-sitemap-generator/sitemap-function.php on line 200
    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/sitemap_baidu.xml) is not within the allowed path(s): (/home1/vhost/vh556830:/home1/vhost/vh556830/temp/:/tmp/expl/:/tmp/) in /home1/vhost/vh556830/www/runshengyf/wp-content/plugins/baidu-sitemap-generator/sitemap-function.php on line 195
    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home1/vhost/vh556830:/home1/vhost/vh556830/temp/:/tmp/expl/:/tmp/) in /home1/vhost/vh556830/www/runshengyf/wp-content/plugins/baidu-sitemap-generator/sitemap-function.php on line 200
    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home1/vhost/vh556830:/home1/vhost/vh556830/temp/:/tmp/expl/:/tmp/) in /home1/vhost/vh556830/www/runshengyf/wp-content/plugins/baidu-sitemap-generator/sitemap-function.php on line 195
    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home1/vhost/vh556830:/home1/vhost/vh556830/temp/:/tmp/expl/:/tmp/) in /home1/vhost/vh556830/www/runshengyf/wp-content/plugins/baidu-sitemap-generator/sitemap-function.php on line 200
    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/sitemap.html) is not within the allowed path(s): (/home1/vhost/vh556830:/home1/vhost/vh556830/temp/:/tmp/expl/:/tmp/) in /home1/vhost/vh556830/www/runshengyf/wp-content/plugins/baidu-sitemap-generator/sitemap-function.php on line 195
    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home1/vhost/vh556830:/home1/vhost/vh556830/temp/:/tmp/expl/:/tmp/) in /home1/vhost/vh556830/www/runshengyf/wp-content/plugins/baidu-sitemap-generator/sitemap-function.php on line 200

    并提示:文件或目录不可写,请修改根目录权限改为777。

    另外设置固定链接时也显示:
    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/.htaccess) is not within the allowed path(s): (/home1/vhost/vh556830:/home1/vhost/vh556830/temp/:/tmp/expl/:/tmp/) in /home1/vhost/vh556830/www/runshengyf/wp-admin/options-permalink.php on line 131
    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home1/vhost/vh556830:/home1/vhost/vh556830/temp/:/tmp/expl/:/tmp/) in /home1/vhost/vh556830/www/runshengyf/wp-admin/options-permalink.php on line 131
    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/.htaccess) is not within the allowed path(s): (/home1/vhost/vh556830:/home1/vhost/vh556830/temp/:/tmp/expl/:/tmp/) in /home1/vhost/vh556830/www/runshengyf/wp-admin/options-permalink.php on line 131
    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/.htaccess) is not within the allowed path(s): (/home1/vhost/vh556830:/home1/vhost/vh556830/temp/:/tmp/expl/:/tmp/) in /home1/vhost/vh556830/www/runshengyf/wp-admin/includes/misc.php on line 133
    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home1/vhost/vh556830:/home1/vhost/vh556830/temp/:/tmp/expl/:/tmp/) in /home1/vhost/vh556830/www/runshengyf/wp-admin/includes/misc.php on line 133
    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/.htaccess) is not within the allowed path(s): (/home1/vhost/vh556830:/home1/vhost/vh556830/temp/:/tmp/expl/:/tmp/) in /home1/vhost/vh556830/www/runshengyf/wp-admin/includes/misc.php on line 133

    我不知道是哪个文件的权限。
    我在FTP把根目录下的文件都设定为了777,但还是不成功
    这个问题该怎么解决呢,具体是要修改哪个文件的权限呢。

查看 1 回复 - 1 至 1 (总计 1)
  • 版主 xslidian

    (@xslidian)

    对于第一个问题,请打开 wp-content/plugins/baidu-sitemap-generator/sitemap-function.php,将所有 $_SERVER["PHP_SELF"] 替换为 __FILE__,保存再试。

    为定位第二个问题的根源,请新建一个文本文件 test130530.php,输入下述内容:

    <?php
    var_dump( __FILE__ );
    var_dump( dirname(__FILE__) );
    var_dump( $_SERVER['DOCUMENT_ROOT'] );
    var_dump( $_SERVER['SCRIPT_FILENAME'] );
    var_dump( $_SERVER['PHP_SELF'] );
    var_dump( $_SERVER['SERVER_SOFTWARE'] );
    var_dump( phpversion() );
    var_dump( PHP_VERSION );
    ?>

    保存后上传到服务器,将访问得到的内容复制过来。

查看 1 回复 - 1 至 1 (总计 1)
  • 话题 ‘生成百度地图和设置固定链接时显示权限不够’不再接受新回复。