Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.