首先我的设置: PHP 5.3.2 - 带有Suoshin和xCache lighttpd/1.4.26
我的代码太长了,无法在这里发布,我将进行描述。
文件x.php正在加载一些PHP类,初始化它们,执行一些函数 ->获取结果数组。
如果我使用print_r打印此数组,我会得到完整的结果。
但是,如果我使用json_encode,则每次都在相同位置截断。-> JSON变得无效。
例如:print_r-
Array
(
[test1] => Array
(
[test2] => 2
[test3] => Array
(
[test4] => 4
)
)
)
json -
{"test1":{"test2":2,"test3":{"te
错误日志显示如下内容:
(mod_fastcgi.c.2582) unexpected end-of-file (perhaps the fastcgi process died): pid: 16708 socket: unix:/tmp/php5.socket-1
(mod_fastcgi.c.3382) response already sent out, but backend returned error on socket: unix:/tmp/php5.socket-1 for /x.php?, terminating connection
问题是如何追踪错误?或者有人知道问题出在哪里吗?