I installed XAMPP 1.7.4 (with PHP 5.3.5), the problem is PHP does not display any error messages. E.g. if I connect to MYSQL with mysql_connect()
without parameters, PHP will not complain about the required fields.
Why is this?
How can I configure PHP to display errors?
If your PHP script is halting (or not executing code like you expect) and not displaying any error messages even though you know there's an error happening, it's likely that the 'display_errors' configuration setting is switched off.
Look for the entry Configuration File (php. Find the Error handling and logging section of the php. ini file. Make sure that both display_errors = On, display_startup_errors = On and log_errors = On are present and uncommented. Check the value of error_log - this tells you the location of the file errors are logged to.
error_reporting: It displays all level errors except E-NOTICE, E-STRICT, and E_DEPRECATED level errors. display_errors: By default, the value of display_errors is off.
To turn on errors at the script level, include at the top of your script:
ini_set('display_errors', 1); error_reporting(~0);
Alternatively, if it is not a production site and simply a development / testing site, you can turn on error reporting in php.ini. Search it for these settings:
error_reporting = E_ALL ;error_reporting = E_ERROR display_errors = On ;display_errors = Off
May be the display error is off
add in .htaccess file of your application.
php_value display_errors on
OR
use this at the top of your php script
ini_set('display_errors',"1");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With