【问题标题】:PHP open_basedirPHP open_basedir
【发布时间】:2013-12-03 19:02:26
【问题描述】:

我收到以下 PHP 警告:

PHP Warning: is_readable(): open_basedir restriction in effect. File(/usr/share/pear//home/domain.nl/application/views/helpers/HeadLink.php) is not within the allowed path(s): (/usr/share/php:/home/domain.nl/:/usr/share/pear:/usr/sbin:/usr/bin:/bin:/tmp:/etc/phpmyadmin:/usr/lib/php4:/usr/lib/php5:/opt/ioncube/lib) in /home/domain.nl/library/Zend/Loader.php on line 186

为什么/usr/share/pear//home/domain.nl/application/views/helpers/..不在允许的路径/usr/share/pear内?

谢谢,

马丁

【问题讨论】:

    标签: php apache open-basedir


    【解决方案1】:

    https://bugs.php.net/bug.php?id=37476

    如果 php 版本早于 5.2,is_readable 会针对不存在的文件抛出此警告。

    您的路径看起来像一条不存在的路径。我的意思是它应该以 /home/ 开头 domain.nl,而 /usr/share/pear/ 部分是无意的。 (可能是 include_path 指令前置?)

    【讨论】:

    • 服务器运行的是5.3.10,所以我猜这个问题仍然存在。 include_path 确实在前面(Zend 框架加载器的默认行为)。
    猜你喜欢
    • 2012-02-21
    • 1970-01-01
    • 2015-12-01
    • 2011-02-14
    • 1970-01-01
    • 2021-04-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多