Knowledgebase: How To
PHP Error Handling
Posted by Joe Rebis (Import) on 23 November 2007 07:58 PM

 

Due to the nature of shared web hosting, we have display_errors = off, which is generally a safe policy with production websites so important data/details are not accidentally displayed to end-users. e.g. data source details. I don't believe we can be 100% confident that any level of error reporting won't accidentally display key information regarding your or our setup.

You MAY be able effect this change for just your website using the ini_set() tag in your code. Perhaps on a globally included page. This will effectively make a run time change to the php.ini tag for your code alone.

 

ini_set('display_errors', TRUE); OR ini_set('display_errors', 1);

ini_set('error_reporting', E_ALL);

 

The above examples may not be 100% correct and only serve as a starting point for your own code. There may be an ever easier or more efficient way. Please consult your PHP guides.

 

Please see: http://www.php.net/errorfunc

 

 

(478 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Copyright © 2015 EPhost, Inc. All rights reserved.