LinuxUK
   Home About us Design services Get in Touch Testimonails Create and account / Log in
Categories
 Templates

 Security checks

 Support Club

 Tips and Tricks

 How to guides osC

 My Contributions

 osCommerce versions

 Base64 Decoder

 Link to us!

Warnings in PHP
Product stats Product Stats
Products name Product Name: Warnings in PHP
Products info Product description

Warnings in PHP are just that warnings, not anything critical like FATAL_ERROR its just that some servers output warning when there is no need.

A warning is not a show stopper, your store will function fine HOWEVER, you do not want your customers seeing these warnings, they might think your store is broke plus its not very professional looking!

In the warning PHP will tell you where the cause of the warning is to be found,

 Warning: Division by zero in /home/vp/www/catalog/includes/classes/split_page_results.php on line 86

See by this warning the file is split_page_results.php and its sourced to line 86

there is an easy way to suppress warning, simply place the "@" character at the start of the line.
If this does not silence the error you can add the following code to the top of the file, make sure its within <?php tags

error_reporting(0);

This will prevent any errors being printed to the screen for that file only.

The above warning by the way is simply telling us in PHP that there are no records to be split!

There is already some suppressing code with in osCommerce or you would see a hell of a lot more than this!

Reviews

Warnings in PHP - TITLE_DEL_ICIO_US Warnings in PHP - TITLE_DIGG Warnings in PHP - TITLE_YAHOO_MYWEB Warnings in PHP - TITLE_SPURL Warnings in PHP - TITLE_FURL Warnings in PHP - TITLE_ASK Warnings in PHP - TITLE_SQIDOO Warnings in PHP - TITLE_SIMPY Warnings in PHP - TITLE_REDDIT Warnings in PHP - TITLE_MA_GNOLIA Warnings in PHP - TITLE_FACEBOOK_BOOKMARK Warnings in PHP - TITLE_GOOGLE_BOOKMARK