PHP 警告与allow_url_include
我有一个非常奇怪的问题,现在一个多星期都无法解决。是关于这个警告的
PHP 警告:添加选项(名称:allow_url_include 值:0)(17, 1)失败! 在第 0 行未知
我没有在任何文件或 .htaccess 中设置 allowed_url_include 选项。
我的本地版本没有这个问题
PHP 版本 5.3.1
在生产机器上我收到上述错误,并且 PHP 版本也是 5.3.1。
我尝试以不同的方式设置该选项,但没有任何方法可以消除警告
php_flagallow_url_include“是”
php_flagallow_url_include“1”
php_flagallow_url_include“否”
php_flagallow_url_include“0”
与上述 4 个示例相同,但不带引号。
一切正常,我没有看到任何问题,但我也有
php_flag log_errors“是”
因此,与上面的警告结合起来,它变得有点糟糕,因为当有人打开网站时,它会用这些警告填充我的日志错误文件,对我来说,很难在文件中查找其他问题。
任何帮助表示赞赏...
I have very strange problem which I can't fix for over a week now. It's about this warning
PHP Warning: Adding option (Name: allow_url_include Value: 0) (17, 1) failed!
in Unknown on line 0
I don't have the allow_url_include option set in any of the files or in .htaccess.
On my local version, I don't have such problem
PHP Version 5.3.1
On production machine I got the above error, and version of PHP there is also 5.3.1.
I try to set the option in different ways, but nothing removes the warning
php_flag allow_url_include "yes"
php_flag allow_url_include "1"
php_flag allow_url_include "no"
php_flag allow_url_include "0"
And above 4 examples, but without quotes.
Everything works and I don't see any problems, but I have also
php_flag log_errors "yes"
So in combination with that and the warning from above it turns kinda bad, since it fills my log errors file with those warnings when someone open the site and for me it's hard to lookup in the file for other problems.
Any help is appreciated...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
allow_url_fopen
是一个布尔标志。根据有关更改运行时配置的 PHP 手册页,预期的语法似乎为:
无引号。它只需要
on
或off
,而不是yes或no或者1或0。allow_url_fopen
is a boolean flag.Per the PHP manual page on changing runtime configuration, the expected syntax seems to be:
No quotes. It only takes
on
oroff
, not yes or no or 1 or 0.问题是主服务器 php.ini 中的语法错误
The problem was syntax error in main server php.ini