简体   繁体   English

php5-fpm堆栈跟踪切断了字符串的结尾

[英]php5-fpm stack trace cuts off end of string

When a particularly long string gets printed to php5-fpm.log the string gets cut off at the end and "..." is shown (without the quotes) to indicate it's been cut off. 当一个特别长的字符串被打印到php5-fpm.log时,字符串在结尾处被切断,并且显示“...”(没有引号)以指示它已被切断。 How can I make it so it displays the whole string regardless of length? 我怎样才能使它显示整个字符串而不管长度如何?

I'm using Nginx with MySQL, PHP and Laravel if that matters. 如果重要的话,我正在使用Nginx与MySQL,PHP和Laravel。 Basically when I print something to the error log like the following: 基本上当我打印错误日志时,如下所示:

error_log(print_r($long_str, TRUE));

If $long_str is long enough it gets cut off. 如果$ long_str足够长就会被切断。 I'm using this for debugging purposes and this worked fine when I was working in Apache so I think it may have something to do with Nginx. 我正在使用它进行调试,当我在Apache工作时这很好用,所以我认为它可能与Nginx有关。

I've tried changing... 我试过改变......

log_errors_max_len = 1024

to

log_errors_max_len = 60000

in both /etc/php5/cli/php.ini and /etc/php5/fpm/php.ini 在/etc/php5/cli/php.ini和/etc/php5/fpm/php.ini中

But it doesn't seem to do anything. 但它似乎没有做任何事情。 How can I get the full string to be printed? 如何获得要打印的完整字符串?

https://github.com/php/php-src/pull/1076 https://github.com/php/php-src/pull/1076

This is a hardcoded limit in php-fpm, the above pull request is trying to remove the limit. 这是php-fpm中的硬编码限制,上面的pull请求试图删除限制。 The limit was added because syslog, to follow the original RFC. 添加限制因为系统日志,遵循原始RFC。 Yet the newer RFC version removed that limit and most people are requesting that the size and message format be configurable in php-fpm 然而,较新的RFC版本删除了该限制,大多数人都要求在php-fpm中配置大小和消息格式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM