Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Tuesday, 26 April 2011

How to turn off PHP errors, notices and warnings within .htaccess

PHP errors, notices, and warnings may be turned off by adding the following code within a website’s .htaccess file:

php_flag display_errors off

Besides potentially interfering with a website’s visual appearance, it is generally not a good idea to display errors, notices, and warnings within a production environment for security reasons, since the error messages may provide useful information on a server / website’s configuration, and thus how to circumvent its security measures.