PHP does not display errors or warnings

I do not know how php.ini was configured as I do not have access to it. But on top of my php code file I have

error_reporting (E_ALL); ini_set ('display_errors', '1');

But still, if there is an error, for example. missing ")", the page is empty. It is so painful to debug without an error message. Why are errors not displayed?

+3
source share
2 answers

Your error is not a runtime error, because it Parse Error: it happens before the page even starts to run.

So, these two instructions that you used have not yet been executed when this error occurs ... and therefore they have no effect.


, Parse, , ; , :

  • IDE, PHP
    • Eclipse PDT,
    • netbeans
  • php -l your-php-file.php
+2

, , - , , ini_set .

:

0

Source: https://habr.com/ru/post/1738722/


All Articles