How to display PHP errors when using Lighttpd and Fast-CGI?

I am running the Lighttpd web server using FastCGI and the web server does not output Parse Parse errors.

My php.ini file has the following settings:

error_reporting = E_ALL
display_errors = Off
display_startup_errors = Off
log_errors = On
html_errors = On

I include error reporting for development in my PHP scripts like this (with redundancy for other environments):

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

Most errors are displayed normally. There are no errors in the parse. The following is an example of code that generates a parsing error. The error is not displayed by the Lighttpd web server, but when executed from the command line, since it does not use FastCGI. (note the missing concatenation operator):

<?php echo 'foo' 'bar'; ?>

, display_errors = On php.ini, FastCGI Lighttpd, PHP- ini_set( 'display_errors', 0 ).

php.ini. PHP FastCGI?

+5
2

, , (, ), , display_errors .

php.net(http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors):

display_errors ( ini_set()), , script . , .

, , .user.ini , , ( .htaccess Apache). PHP- , , , .

, .user.ini , php , :

error_reporting = -1
display_errors = On
html_errors = On

. http://php.net/manual/en/configuration.file.per-user.php

+4

, . , .user.ini .

.user.ini:

error_reporting = E_ALL
display_errors = On
html_errors = On
display_startup_errors = On
log_errors = On

.

0

All Articles