Emp*_*nes 6 php http apache2 httpd.conf
以下脚本未向浏览器输出错误消息.相反,它会导致HTTP Error 500响应.
<?php
error_reporting(E_ALL);
ini_set('display_errors', 'On');
phpinfo();
echo "test" asdf // This should error
?>
Run Code Online (Sandbox Code Playgroud)
想法?这是ubuntu上基本的php5/apache2安装.httpd.conf是空白的,没有.htaccess文件.
error.log文件显示错误消息:
语法错误,意外的T_STRING,期待','或';'
哪个是对的.
<?php
error_reporting(-1);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
phpinfo();
echo "test" asdf // This should error
?>
Run Code Online (Sandbox Code Playgroud)
在error_reporting -1显示的内容中,甚至超过了E_ALL和 fordisplay_errors我使用了值1而不是On。
http://php.net/manual/en/function.error-reporting.php http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors
编辑:我得到了答案!
如果脚本存在阻止其运行的解析错误,这也会阻止它更改 PHP 设置。
| 归档时间: |
|
| 查看次数: |
6263 次 |
| 最近记录: |