Error reporting

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
coldlamper
Forum Newbie
Posts: 2
Joined: Tue Aug 24, 2004 1:44 pm

Error reporting

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

In your code try:

Code: Select all

error_reporting(E_ALL);
coldlamper
Forum Newbie
Posts: 2
Joined: Tue Aug 24, 2004 1:44 pm

Post by coldlamper »

So ini_set('display_errors','1');
doesn't work for parse errors?

Is there any work around besides changing the php.ini?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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...
Post Reply