Re[2]: [PHP] Length of Exception text?

From: Date: Tue, 09 Sep 2008 23:18:36 +0000
Subject: Re[2]: [PHP] Length of Exception text?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-279755@lists.php.net to get a copy of this message
Greetings, Peter Ford. In reply to Your message dated Tuesday, September 9, 2008, 12:37:30, >>>>> I've been working on some PEAR-based app last week and I ran into >>>>> problem. >>>>> While I debugging app, my backtrace always trimmed at some point. >>>>> First time I though it was my mistake, and switched back to standard >>>>> "Exception" class. >>>>> But nothing changed. >>>>> >>>>> If I print everything by hands, it's all full and good, but if I let >>>>> PHP print >>> >>>> what do you mean by: >>> >>>> 1. print by hand >>> >>> Catch excetion and manually call getTraceAsString. >>> >>>> 2. let PHP print >>> >>> Do not catch exception, let PHP behave on it's own way. >> >> are you printing to screen or to error_log (or syslog)? I believe >> error_log has a limit as to the >> length of the string that will actually be logged ... I can't remember >> whether this >> was php, apache or system related. >> > You want the php.ini setting: > log_errors_max_len > It defaults to 1024 characters: presumably that includes the preamble giving you > 1015 or so to play with. > If you set it to zero then you get unlimited log messages. 'course that might > fill your logs up a bit... Good catch indeed. I was confused by the strange limit (not 1023-1024 as I expect that), so I haven't checked if this setting affecting things. And don't worry about my log :) I want it enabled for php-cli.ini only, for development purposes. On live suite, exceptions generally never breaking out to {main} scope. -- Sincerely Yours, ANR Daemon <anrdaemon@freemail.ru>

« previous php.general (#279755) next »