In php why we should go for diplaying the errors in the server by means of error_log ,without displaying in the browser
Security reasons. You can give away info that you don't want users to know in error messages. Also, they are not nice to look at
It is best to set track_errors to On if your gonna stop displaying errors. Otherwise you can never know when an error occured while processing your script. If you use track_errors, the error is stored in a php variable named $php_errormsg (not 100% sure it's called this way, but it should be something similar), and you will have to check at certain points in your script if an error occured (which is kinda redundant, as you will have to kill your script at that point, which is exactly the same as what the default error handler does). A better way to get rid of the errors, is to create your own error handler. Here's a small example: set_error_handler("my_error_handler"); function my_error_handler ($errNo, $errString, $errFile, $errLine) { // if you don't allready store the error in the error log: error_log("[" . $errNo . "] " . $errString. ": in " . $errFile . " @line " . $errLine); // now dislpay a custom error message: die("Something went wrong processing this page, the webmaster has been informed"); } PHP: This will stop the output of the php errors, but allows you to display custom errors, which is a lot nicer, as you can simply output an error html page.