PHP 的 open_basedir 值在 Apache 日志中给出二进制值
查看日志文件以找出我的网站几天前关闭的原因,我发现了数百行这样的行(部分用“x”进行了编辑):
[2009 年 11 月 27 日星期五 23:14:36] [错误] [客户端 xxx.xxx.xxx.xxx] PHP 警告: require_once(): open_basedir 限制生效。 文件(/var/www/xxx/xxx.php)不是 在允许的路径内: (\xa0\x99\xc4) 在 /var/www/xxx/index.php 第 17 行
请注意,open_basedir 值是二进制的,因此它不会匹配任何内容。
没有在服务器上进行任何(管理)更改来导致此问题,也没有进行任何更改来阻止它..它显然自行解决了(apache或其他服务没有重新启动/重新加载)。 apache conf 文件中的 open_basedir 指令如下所示:
php_admin_value open_basedir /var/www:/usr/share/php
什么会导致 open_basedir 值重新加载为二进制值,或者我可以从哪里开始解决这个问题?这是过去两周内第二次出现此问题。
Apache版本:2.2.8,PHP:5.3.0,Linux 2.6.24-23
Reviewing logfiles to figure out why my site was down a few days ago, I found hundreds of lines like these (partially redacted with "x"):
[Fri Nov 27 23:14:36 2009] [error]
[client xxx.xxx.xxx.xxx] PHP Warning:
require_once(): open_basedir
restriction in effect.
File(/var/www/xxx/xxx.php) is not
within the allowed path(s):
(\xa0\x99\xc4) in
/var/www/xxx/index.php on line 17
Note that the open_basedir value is binary, so it won't match anything.
No (admin) change was made on the server to cause this, and none was made to stop it.. it apparently resolved itself on its own (apache or other services weren't restarted/reloaded). The open_basedir directive in the apache conf file looks like this:
php_admin_value open_basedir
/var/www:/usr/share/php
What would cause the open_basedir value to reload with a binary value, or where can I even start to troubleshoot this? This is the second time in the last two weeks this problem has arisen.
Apache version: 2.2.8, PHP: 5.3.0, Linux 2.6.24-23
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来类似于此错误,应该在 5.3.1 中修复。
Looks similar to this bug, which should be fixed in 5.3.1.