PHP does not display error messages
Scenario:
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?
Fix1:
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);
error_reporting(~0);
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
Fix2:
Add the following statement in the .htaccess file.
php_value display_errors on
Applies to:
Related Tags:
- PHP does not display error messages
- PHP: Show Errors and Error Handling
- PHP is not showing any error messages
- PHP error_reporting () Function