Jump to content

[SOLVED] Error reporting?


waynew

Recommended Posts

Okay, I'm having some major problems. I'm swamped with bugs left right and centre, yet for some reason, all my Apache server is doing is vomiting up that same old 500 error crap. I've tried

error_reporting(E_ALL);

and still no cigar. Please, could somebody enlighten me as to how I can enable PHP error reporting on an Apache localhost server? Thanks.

Link to comment
https://forums.phpfreaks.com/topic/111483-solved-error-reporting/
Share on other sites

What version of php? There was a bug in 5.2.4 (I think) where if output buffering was on in php.ini, errors weren't displayed because they forgot to call the cleanup code to flush the output buffers when a page terminates due to an error.

 

If you are using this version, upgrade or turn output_buffering off in php.ini (stop and start your web server to get any changes made to php.ini to take effect.)

 

Also, make sure that display_errors is On.

 

You should set error_reporting and display_errors in your php.ini (or a .htaccess file) so that fatal parse errors will be displayed. Turning these settings on in your script won't help with parse errors and if you put these settings in your script you will need to remember to remove them when you put your code onto a live server.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.