How to make PHP show all errors again?!

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
oskare100
Forum Commoner
Posts: 80
Joined: Sun Oct 29, 2006 5:47 am

How to make PHP show all errors again?!

Post by oskare100 »

Hello,
Before I changed to my own server PHP always showed all errors, also things like if I had forgotten a ; on one line it told me that something was wrong. Now, it just shows a bland page and I have to go though the whole script or guess.

I have added;

Code: Select all

error_reporting(E_ALL);
ini_set('display_errors', '1');
But it doesn't help, it still just shows blank pages when something is wrong. Isn't it possible to change something in the PHP config file or something else to make PHP show all errors?

Thanks in advance,
Best Regards
Oskar R
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

php manual wrote: Note: Although display_errors may be set at runtime (with ini_set()), it won't have any affect if the script has fatal errors. This is because the desired runtime action does not get executed.
just switch display_errors on in your php.ini
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

you could also try ini_set('error_reporting', E_ALL);

Also, from the manual:
Note: Although display_errors may be set at runtime (with ini_set()), it won't have any affect if the script has fatal errors. This is because the desired runtime action does not get executed.
So it looks like you'll have to use either php.ini OR your .htaccess file to set this,

refer to: http://www.php.net/manual/en/ref.errorf ... -reporting
Post Reply