I'm running nginx and PHP 5.5 and all my error_log
messages are getting truncated when the string that's passed is long.
I've updated my php.ini
file and increased the log max length from 1024 to 0 (no maximum) and it's still happening.
You need to recompile Nginx if you want log lines longer than 2048 bytes. From http://wiki.nginx.org/HttpLuaModule:
There is a hard-coded length limitation on the error messages in the Nginx core. It is 2048 bytes at most, including the trailing newlines and the leading timestamps. You can manually modify this limit by modifying the NGX_MAX_ERROR_STR macro definition in the src/core/ngx_log.h file in the Nginx source tree. If the message size exceeds this limit, the Nginx core will truncate the message text automatically.
The 1024 character limit is hard-coded in php-fpm and you will need to re-compile it.
If you want to go over 2048 characters you will need to re-compile nginx too.
There is a full solution with patches for 8192 characters here: https://forums.freebsd.org/threads/56543/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With