Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Blank page instead of error reporting


DavidR

Recommended Posts

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:

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...