免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3193 | 回复: 1
打印 上一主题 下一主题

一个很奇怪的问题,有关require,include和require_once,include_once [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-06-23 15:42 |只看该作者 |倒序浏览
设置了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就可以随便浏览系统文件了?

论坛徽章:
0
2 [报告]
发表于 2011-06-23 16:53 |只看该作者
自己解决了
发个牢骚{
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就出问题
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP