开发者社区> 问答> 正文

php open_basedir restriction in effect. 的问题?报错

PHP Warning:  is_readable(): open_basedir restriction in effect. File(/usr/bin/../../lib/autoload/sfCoreAutoload.class.php) is not within the allowed path(s): (/var/www/html/) in /usr/bin/symfony on line 20


Warning: is_readable(): open_basedir restriction in effect. File(/usr/bin/../../lib/autoload/sfCoreAutoload.class.php) is not within the allowed path(s): (/var/www/html/) in /usr/bin/symfony on line 20
PHP Warning:  is_dir(): open_basedir restriction in effect. File(/usr/share/pear/symfony) is not within the allowed path(s): (/var/www/html/) in /usr/bin/symfony on line 30


Warning: is_dir(): open_basedir restriction in effect. File(/usr/share/pear/symfony) is not within the allowed path(s): (/var/www/html/) in /usr/bin/symfony on line 30
PHP Fatal error:  Uncaught exception 'Exception' with message 'Unable to find symfony libraries' in /usr/bin/symfony:32
Stack trace:
#0 {main}
  thrown in /usr/bin/symfony on line 32


Fatal error: Uncaught exception 'Exception' with message 'Unable to find symfony libraries' in /usr/bin/symfony:32
Stack trace:
#0 {main}

  thrown in /usr/bin/symfony on line 32

如上述报错,安装symfony时,symfony安装后/var/www/html中不允许包含。

open_basedir在配置中是/var/www/html的话,symfony用pear安装的,路径在/usr下。


展开
收起
爱吃鱼的程序员 2020-06-20 16:47:07 780 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    open_basedir='/var/www/html/:/usr/share/pear/';回复<aclass='referer'target='_blank'>@姚善良:open_basedir用于限制PHP脚本所能操作的目录树,Linux用冒号(:)分隔路径,Windows用分号(;)分隔路径.中间是用冒号分开吗?急,在线等Thanks

    改了php.ini中的open_basedir仍报错open_basedirrestrictionineffect,请看这篇文章:<arel="nofollow">http://www.youyong.top/article/1158ec559d14c

    2020-06-20 16:47:23
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
PHP安全开发:从白帽角度做安全 立即下载
PHP 2017.北京 全球开发者大会——高可用的PHP 立即下载
复杂PHP系统性能瓶颈排查及优化 立即下载