DavidR Posted August 16, 2010 Posted August 16, 2010 It's been a while since I worked with osC but I'm getting back in the groove. I'm using the latest 2.2 and I've noticed that php errors are not being reported to the page, but instead I get a total blank -- no source no nothing. For instance, I made an error installing an add-on by forgetting to add a comment delimiter "//" and when I tried to access the Admin section, I got a blank page. This makes it very hard to debug. Error reporting in application_top.php looks the same as always, error_reporting(E_ALL & ~E_NOTICE); I know I can look at the error log, but working on the initial configuration is much faster when the error reports to the browser. I'm on PHP 5.3x if that makes a difference. Is there a basic setting somewhere I am missing? Thanks for any help, this is making it harder to catch up :huh:
chadcloman Posted August 16, 2010 Posted August 16, 2010 I ran into this problem and found out that it's controlled by a PHP configuration directive: display_errors. If you don't want to change it in php.ini, you change it via .htaccess like so: php_flag display_errors on As I understand it, however, you may want to enable it when debugging and then turn it off for production use. . Check out Chad's News.
DavidR Posted August 19, 2010 Author Posted August 19, 2010 you may want to enable it when debugging and then turn it off for production use. Exacty. While working on the site it saves a lot of time to just see the error right away, but I can see why hiding the bits those errors can disclose is best in daily use. Thanks for your help, I'll change that tomorrow! FYI, I also thought about looking into this add-on by FWR: http://addons.oscommerce.com/info/7217
FIMBLE Posted August 19, 2010 Posted August 19, 2010 if its only the one page you want to look at add this to the top of the file you are working on ini_set('display_errors',1); error_reporting(E_ALL); Nic Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
Recommended Posts
Archived
This topic is now archived and is closed to further replies.