#41035 [NEW]: "log_errors_max_len" has no effect for values over 1024 or 0

2007-04-09 Thread sv_forums at fmethod dot com
From: sv_forums at fmethod dot com
Operating system: Windows XP
PHP version:  5.2.1
PHP Bug Type: PHP options/info functions
Bug description:  "log_errors_max_len" has no effect for values over 1024 or 0

Description:

The "log_errors_max_len" config option should allow us to disable the cap
limit if we set it to 0. This has no effect and the actual limit remains
1024. Same about entering values over 1024.

Reproduce code:
---
1. Use the following error reporting settings:

error_reporting(E_ALL|E_STRICT);
ini_set('display_errors',0);
ini_set('log_errors',1);
ini_set('log_errors_max_len','0'); // alternatively use values larger
than 1024, they also don't work
ini_set('html_errors',0);

2. Produce a code with enough nested calls so when you throw an exception,
together with the full stack trace, it'll be over 1024 bytes

3. Throw exception inside the chain.

4. Check the log.

Expected result:

Since in the example above I've set log_errors_max_len to 0, the log stack
traces should not be clipped at the 1024 boundary, but it is.

Actual result:
--
The error report log gets clipped at 1024 bytes.

-- 
Edit bug report at http://bugs.php.net/?id=41035&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41035&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41035&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41035&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41035&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=41035&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=41035&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=41035&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=41035&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=41035&r=support
Expected behavior:http://bugs.php.net/fix.php?id=41035&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=41035&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=41035&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41035&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41035&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41035&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=41035&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=41035&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41035&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=41035&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=41035&r=mysqlcfg


#41035 [Fbk->Opn]: "log_errors_max_len" has no effect for values over 1024 or 0

2007-04-10 Thread sv_forums at fmethod dot com
 ID:   41035
 User updated by:  sv_forums at fmethod dot com
 Reported By:  sv_forums at fmethod dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PHP options/info functions
 Operating System: Windows XP
 PHP Version:  5.2.1
 New Comment:

Description:

The "log_errors_max_len" config option should allow us to disable the
cap limit if we set it to 0. This has no effect and the actual limit
remains 1024. Same about entering values over 1024.

Reproduce code:
---
1. Use the following sample code:



2. Check the log.

Expected result:

Since in the example above I've set log_errors_max_len to 0, the log
stack traces should not be clipped at the 1024 boundary, but it is.

Actual result:
--
The error report log gets clipped at 1024 bytes.


Previous Comments:


[2007-04-10 13:17:52] webmaster at wiedmann-online dot de

'log_errors_max_len' is not the filesize of the logfile. It's the
maximum lenght of an error message, printed in each log entry.

Reproduce code:
---


Actual result:
--
[10-Apr-2007 15:13:58] PHP Warning:  - in C:\php-5.2.1\testlog.php on
line 13
[10-Apr-2007 15:13:58] PHP Warning:  -- in C:\php-5.2.1\testlog.php on
line 13
[10-Apr-2007 15:13:58] PHP Warning:  --- in C:\php-5.2.1\testlog.php on
line 13
[10-Apr-2007 15:13:58] PHP Warning:   in C:\php-5.2.1\testlog.php
on line 13
[10-Apr-2007 15:13:58] PHP Warning:  - in C:\php-5.2.1\testlog.php
on line 13



[2007-04-10 07:55:44] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



----

[2007-04-10 05:11:40] sv_forums at fmethod dot com

Description:

The "log_errors_max_len" config option should allow us to disable the
cap limit if we set it to 0. This has no effect and the actual limit
remains 1024. Same about entering values over 1024.

Reproduce code:
---
1. Use the following error reporting settings:

error_reporting(E_ALL|E_STRICT);
ini_set('display_errors',0);
ini_set('log_errors',1);
ini_set('log_errors_max_len','0'); // alternatively use values larger
than 1024, they also don't work
ini_set('html_errors',0);

2. Produce a code with enough nested calls so when you throw an
exception, together with the full stack trace, it'll be over 1024 bytes

3. Throw exception inside the chain.

4. Check the log.

Expected result:

Since in the example above I've set log_errors_max_len to 0, the log
stack traces should not be clipped at the 1024 boundary, but it is.

Actual result:
--
The error report log gets clipped at 1024 bytes.





-- 
Edit this bug report at http://bugs.php.net/?id=41035&edit=1