Everytime I get an error in any of my PHP, my local Apache server gives me a 500 Internal Server error. I never seem to have problems with any of my CakePHP projects, but this is plain vanilla PHP and it is really slowing down progress having to guess at the error.
HTTP Status 500 – Internal Server Error Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Check the error_reporting , display_errors and display_startup_errors settings in your php. ini file. They should be set to E_ALL and "On" respectively (though you should not use display_errors on a production server, so disable this and use log_errors instead if/when you deploy it).
Enable error reporting using the following PHP code:
ini_set('display_errors','On');
error_reporting(E_ALL);
PHP Docs
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