PHP does not display error messages

Wikitechy | 1427 Views | php | 13 Jun 2016



When I try to execute the PHP script with mysql_connect() without parameters, PHP will not complain about the required fields.Why is this?

How can I configure PHP to display errors?


Here is the fix to resolve this issue by “Turn on errors” at the script level and include the top of our php script.

ini_set('display_errors', 1);

Are else if the site is not a production site & simply a development / testing site, means just turn on error reporting in php.ini. search it inside the setting.

error_reporting  =  E_ALL
;error_reporting  =  E_ERROR
display_errors = On
;display_errors = Off


Add the following statement in the .htaccess file.

php_value display_errors on

Applies to:

  • PHP 3 and 4
  • PHP 5
  • PHP 6 and Unicode
  • PHP 7

Related Tags:

  • PHP does not display error messages
  • PHP: error_reporting
  • PHP: Show Errors and Error Handling
  • PHP is not showing any error messages 
  • PHP error_reporting () Function
  • PHP Error Handling
  • php display_errors
  • php error_reporting
  • php error_reporting
  • php display_errors
  • php.ini error reporting
  • php.ini error_reporting


Bug Bounty

Join our Community