一个很奇怪的问题,有关require,include和require_once,include_once
时间:2011-06-23
来源:互联网
设置了open_basedir
只要使用require或include包含文件(不管是./xx.php还是xx.php)都是报下面的错误
Warning: include() [function.include]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/:/tmp/:/var/cache/) in /var/www/testdir.php on line 2
而且修改php.ihi error_reporting = E_ALL & ~E_NOTICE还是会产生
FastCGI sent in stderr: "PHP Warning: include() [function.include]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/:/tmp/:/var/cache/) in /var/www/testdir.php on line 2" while reading response header from upstream, client: 192.168.1.63, server: localhost, request: "GET /testdir.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.207"
但是奇怪的是用require_once或include_once就不会有任何的warning或错误
这是为什么?
网上很多都说是注释open_basedir,可这样不是一个webshell就可以随便浏览系统文件了?
只要使用require或include包含文件(不管是./xx.php还是xx.php)都是报下面的错误
Warning: include() [function.include]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/:/tmp/:/var/cache/) in /var/www/testdir.php on line 2
而且修改php.ihi error_reporting = E_ALL & ~E_NOTICE还是会产生
FastCGI sent in stderr: "PHP Warning: include() [function.include]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/:/tmp/:/var/cache/) in /var/www/testdir.php on line 2" while reading response header from upstream, client: 192.168.1.63, server: localhost, request: "GET /testdir.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.207"
但是奇怪的是用require_once或include_once就不会有任何的warning或错误
这是为什么?
网上很多都说是注释open_basedir,可这样不是一个webshell就可以随便浏览系统文件了?
作者: Ophite 发布时间: 2011-06-23
自己解决了
发个牢骚{
baidu了N久没一个用
google第一页就OK了
}
原来是eaccelerator的原因。
官方说明
--without-eaccelerator-use-inode
Don't use inodes to determine hash keys. This is turned off by default in win32 because it doesn't use inodes. If disabled md5 is used to hash the filenames, which adds extra overhead.
怪不得我用2003测试的时候没问题。linux就出问题
发个牢骚{
baidu了N久没一个用
google第一页就OK了
}
原来是eaccelerator的原因。
官方说明
--without-eaccelerator-use-inode
Don't use inodes to determine hash keys. This is turned off by default in win32 because it doesn't use inodes. If disabled md5 is used to hash the filenames, which adds extra overhead.
怪不得我用2003测试的时候没问题。linux就出问题
作者: Ophite 发布时间: 2011-06-23
那linux要怎么解决呢?
作者: 飘云 发布时间: 2013-04-29
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28