Want to know how to get PHP errors to display? Use the following PHP code to enable PHP errors, warning, notice to display.
1 2 3 | ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); |
However, this doesn’t make PHP to show parse errors – the only way to show those errors is to modify your php.ini with this line:
1 | display_errors = on |
(if you don’t have access to php.ini
, then putting this line in .htaccess
might work too):
1 | php_flag display_errors 1 |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.