Page 1 of 1

Error reporting

Posted: Tue Aug 24, 2004 1:44 pm
by coldlamper
In my php ini I have display_error = off
In my code I use ini_set('display_errors','1');
I never get the error messages.
When I edit my php ini and set display_error = on I get error messages.

Why doesn't ini_set('display_errors','1'); work?

Are there any known bugs in using the ini_set?

I've seen similar problems from others with no answer.

Thanks for any info.

Posted: Tue Aug 24, 2004 1:47 pm
by feyd
parse errors are handled before the code is run.. if those are the errors you are talking about, then it is functioning the only way it can.

Posted: Tue Aug 24, 2004 1:48 pm
by Buddha443556
In your code try:

Code: Select all

error_reporting(E_ALL);

Posted: Tue Aug 24, 2004 1:58 pm
by coldlamper
So ini_set('display_errors','1');
doesn't work for parse errors?

Is there any work around besides changing the php.ini?

Posted: Tue Aug 24, 2004 2:13 pm
by feyd
setting it via .htaccess (or whatever you have for directory level settings)

http://talks.php.net/show/debugging/2 for the php_value setting...