Php parse errors will not be displayed

I am running ubuntu 10.04 + nginx + php-fpm 5.4

If I install display_errors = Onin php.ini, all errors are printed. If instead I turned it off and then used ini_set ('display_errors,' 1 '); directly in the script, they will also be displayed, but not parsing errors, just a blank page. I tried to play with error_reporting too and E_STRICT, but I could not find a way!

+3
source share
4 answers

If you turn off display_errorsin php.ini, and then turn it in your PHP script using ini_set(), it will be visible only after a string containing the call ini_set()was made .

, PHP , PHP (, " " ).

, , ini_set() - , display_errors ; , , .

+14

display_errors, . , Ubuntu + apache, /var/log/apache2/error_log. , , - tail -f /var/log/apache2/error_log.

, php.

+2

here I am years after the answer, but I found a way around this.

For the script I am writing, I created a second script that includes the ini_set () directives, followed by the inclusion for the script I really do .

To do this, here test_run.php

<?php

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

include('./my_script.php');

?>
0
source

Give it a try error_reporting(E_ALL);. Or docs

-1
source

All Articles