PHP error reporting
As of developer view, error reporting is more sensitive one.There are 3 types of errors.
1) Fatal error
2) Warning error
3) Notice error
In production environment, we cant see the errors in live it appears blank page.
In this case, you want to see the server log normally for apache server which is generated in the server log file
/var/log/apache2/error.log
In terminal, you see the last few occurences error as
tail -f /var/log/apache2/error.log
While developing environment you want to see the all errors through
ini_set('display_errors', 1); /*By default its value as 0 in php.ini*/ error_reporting(-1); /*It shows all errors*/
No comments:
Post a Comment