A little bit about the development and its side

Technical blog

Show PHP errors with 500 error code

Show PHP errors with 500 error code

Often, when developing with PHP, there are moments when a 500 error occurs on the page and it is not always convenient to look into error logs every time.

In cases where you want to immediately see the cause of the 500 error, you can add a few lines in the project where the application script is executed:

ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');

However, this does not force PHP to show syntax errors - the only way to show these errors is to change your php.ini with this line:

display_errors = on

(if you don't have access to php.ini, entering this line in .htaccess may also work):

php_flag display_errors 1

Source: https://stackoverflow.com/questions/1053424/how-do-i-get-php-errors-to-display

Write a comment
Attention: HTML is not supported! Use plain text.