Mateobus Posted November 20, 2007 Share Posted November 20, 2007 Hello, I am having a very difficult time getting my errors to show on my page, particularly parse errors. I have a big script that has a parse error (i don't know where), and it would be much easier to test my script with error reports telling me what the problem is, but instead i just get a white page. I have played around with various settings, and I have had no luck. Here is a snippet of the script which is having problems. error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); ini_set('display_errors', '1'); ini_set('display_startup_errors', '1'); ini_set('safe_mode', ''); Also, when I run phpinfo(), i get 6143 --not sure what that means. Thanks in advance Link to comment https://forums.phpfreaks.com/topic/78147-solved-php-error-reporting/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 20, 2007 Share Posted November 20, 2007 Both - display_startup_errors and safe_mode cannot be set in a script at all. The reason why the other two lines don't help you (they work for everything except fatal parse errors) is because a parse error occurs before the code is executed and those two lines never get executed. To see fatal parse error you either need to check your web server log for errors or turn on display_errors and set the error_reporting level in php.ini or a .htaccess file. For a .htaccess file, use the following - php_flag display_errors on php_value error_reporting 6143 The 6143 value is the equivalent of E_ALL, but the constant E_ALL has no meaning outside of php.ini or a php script. Link to comment https://forums.phpfreaks.com/topic/78147-solved-php-error-reporting/#findComment-395491 Share on other sites More sharing options...
Mateobus Posted November 20, 2007 Author Share Posted November 20, 2007 cheers PFMaBiSmAd -> that workd! Link to comment https://forums.phpfreaks.com/topic/78147-solved-php-error-reporting/#findComment-395498 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.