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

 Security checks

 Power OSC

 Free Sites

 Support Club

 Tips and Tricks

 How to guides osC

 My Contributions

Best Buys
Best
Best
£99.99
£89.99
LiveZilla Live Help
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 - Bookmark with Delicious Warnings in PHP - Bookmark with Digg Warnings in PHP - Bookmark with Yahoo, My webb Warnings in PHP - Bookmark with Spurl Warnings in PHP - Bookmark with Furl Warnings in PHP - Bookmark with Ask Warnings in PHP - Bookmark with Sqidoo Warnings in PHP - Bookmark with Simply Warnings in PHP - Bookmark with Reddit Warnings in PHP - Bookmark with Magnolia Warnings in PHP - Bookmark with Facebook Warnings in PHP - Bookmark with Google