Nginx + FastCGI + PHP (php-fpm) not logging caught errors/warnings -


fastcgi doesn't want log php errors properly. well, that's not entirely true: logs errors fine, little fiddling; won't log else, such warnings.

the notorious fastcgi -> nginx log bug isn't issue, necessarily. errors , warnings php-fpm go straight nginx--but if they're uncaught. is, if set_error_handler intercepts error, no log entry appended. means can see parse errors, that's it.

php-fpm doesn't log php errors (separate nginx) without bit of hack. php-fpm's instance configuration file includes these 2 lines default:

php_admin_value[error_log] = /mnt/log/php-fpm/default.log php_admin_flag[log_errors] = on 

i changed error_log path, obviously. had add following line log anything:

php_admin_value[error_reporting] = e_all & ~e_deprecated & ~e_strict 

version note: e_strict part unnecessary, i'm using php 5.3.27, plan on upgrading 5.4 @ point. line, logs errors--and errors--to /mnt/log/php-fpm/default.log. now, sets error_reporting same value have set in php.ini, wrong here. in addition, doesn't log caught errors: behavior identical of nginx log. tried using numeric value (22527) instead, still no luck.

i don't care in log file entries end (nginx versus php-fpm), need caught errors logged somewhere. resort injecting own error , exception handlers, that's bit hackish, i'd rather avoid that.

i use directive in pool configuration file php-fpm:

catch_workers_output = yes


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -