Jump to content

Archived

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

AlexGrim

Error Reporting

Recommended Posts

Hey guys, i've got something that has been bugging me to death for almost 1 year now. Error reporting!

I own quite a few websites, and i work on them locally and test them until they are sound enough to put on my live servers for use.

The problem is, that after i will upload a large project, i get brazillian freakin error notices (undefined index, etc) that are embarrassing.

 

I ALWAYS use error_reporting(E_ALL) and have even tried it with E_STRICT and yet i NEVER GET ANY FREAKING ERRORS!

I am running Apache, on Fedora, with PHP 5.* and MySql 5.*. I don't know why i cannot see my errors locally, but i can always see them on Godaddy's servers, when i'm using the exact same error setting, but if someone could point me in the right direction on this, i'd be grateful.

 

This makes the development process take me longer, because i cannot see errors, and so, if something doesn't work, i have to step through myself to find what the problem was, instead of php telling where it is. I have looked around to see if there is something that may need changing to get errors, but i came up with nothing.

 

Thanx all.

Share this post


Link to post
Share on other sites

If the errors aren't critical you can turn display_errors Off to get around the initial embarassment. Turn log_errors On will capture the errors in a file where you can see them.

Share this post


Link to post
Share on other sites

To show errors on your development system so that you can find and correct them, add the following line of code along with your error_reporting(E_ALL) statement -

 

ini_set("display_errors", "1");

 

If you set the error_reporting and display_errors settings in php.ini, you will also get fatal parse errors to be displayed.

Share this post


Link to post
Share on other sites

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