Thứ Hai, 12 tháng 10, 2009

Enable error reporting in your environment

I often find systems with dozens of errors simply because developers turn off reporting, and as PHP allow Notices and some errors to go by they simply don't care. This can hide big coding problems and it also looks really bad on a developer / company. This MUST never be done, turn on your debugging!

To turn on error reporting:
Permanently (A MUST for all developers and managers):

1. Open PHP.ini
2. Set error_reporting = E_ALL;


* After PHP 5 you can use E_STRICT; to get notice of deprecated functions
Runtime
At the beginning of your code add:

error_reporting(E_ALL);

* When you set tequila to debug mode, error reporting is turned on
Disable error suppression
PHP allows @ symbol to suppress errors, this is very useful in some cases but at debugging time must be removed to be able to see the errors.
Find php framework and more useful information about RAD workflow open source.

Không có nhận xét nào:

Đăng nhận xét