Edit report at https://bugs.php.net/bug.php?id=60074&edit=1

 ID:                 60074
 Comment by:         tyr...@php.net
 Reported by:        tyr...@php.net
 Summary:            Stack trace truncated for long paths
 Status:             Bogus
 Type:               Bug
 Package:            Scripting Engine problem
 PHP Version:        5.4.0beta1
 Block user comment: N
 Private report:     N

 New Comment:

"When would you ever need a thousand character path, honestly?!"
the problem is reproducible with a much shorter path, as Felipe pointed out the 
log_errors_max_len defaults to 1024, so you can easily bump into this either 
with 
a moderately long path, or with a long error/stack trace.
I purposely used a very long path in my report to point out that it is possible 
to 
completely truncate the stack trace.


Previous Comments:
------------------------------------------------------------------------
[2011-10-19 03:00:42] anon at anon dot anon

When would you ever need a thousand character path, honestly?!

------------------------------------------------------------------------
[2011-10-18 23:03:15] fel...@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You have to change the log_errors_max_len INI entry. (defaults to 1024)

------------------------------------------------------------------------
[2011-10-16 22:44:04] tyr...@php.net

Description:
------------
running the test script(via php -n -f test.php) in my home directory gives me:

Fatal error: Uncaught exception 'Exception' with message 'Foo' in 
/home/tyrael/test.php:8
Stack trace:
#0 /home/tyrael/test.php(4): b()
#1 /home/tyrael/test.php(11): a()
#2 {main}
  thrown in /home/tyrael/test.php on line 8

running the same script in a directory with a long path gives me:

Fatal error: Uncaught exception 'Exception' with message 'Foo' in 
/home/tyrael/12345678901234567890123456789012345678901234567890/1234567890123456
7890123456789012345678901234567890/123456789012345678901234567890123456789012345
67890/12345678901234567890123456789012345678901234567890/12345678901234567890123
456789012345678901234567890/12345678901234567890123456789012345678901234567890/1
2345678901234567890123456789012345678901234567890/123456789012345678901234567890
12345678901234567890/foo/12345678901234567890123456789012345678901234567890/1234
5678901234567890123456789012345678901234567890/123456789012345678901234567890123
45678901234567890/12345678901234567890123456789012345678901234567890/12345678901
234567890123456789012345678901234567890/1234567890123456789012345678901234567890
1234567890/12345678901234567890123456789012345678901234567890/123456789012345678
90123456789012345678901234567890/12345678901234567890123456789012345678901234567
890/12345678901234567890123456789012345678901234567890/1234567890123456789012345
67890123456 in 
/home/tyrael/12345678901234567890123456789012345678901234567890/1234567890123456
7890123456789012345678901234567890/123456789012345678901234567890123456789012345
67890/12345678901234567890123456789012345678901234567890/12345678901234567890123
456789012345678901234567890/12345678901234567890123456789012345678901234567890/1
2345678901234567890123456789012345678901234567890/123456789012345678901234567890
12345678901234567890/foo/12345678901234567890123456789012345678901234567890/1234
5678901234567890123456789012345678901234567890/123456789012345678901234567890123
45678901234567890/12345678901234567890123456789012345678901234567890/12345678901
234567890123456789012345678901234567890/1234567890123456789012345678901234567890
1234567890/12345678901234567890123456789012345678901234567890/123456789012345678
90123456789012345678901234567890/12345678901234567890123456789012345678901234567
890/12345678901234567890123456789012345678901234567890/1234567890123456789012345
6789012345678901234567890/12345678901234567890123456789012345678901234567890/123
45678901234567890123456789012345678901234567890/12345678901234567890123456789012
345678901234567890/12345678901234567890123456789012345678901234567890/1234567890
1234567890123456789012345678901234567890/123456789012345678901234567890123456789
01234567890/12345678901234567890123456789012345678901234567890/test.php on line 
8

As you can see, the output doesn't contain the Stack trace anymore.

Test script:
---------------
// create a directory with a long path and run this script from that directory 

<?php

function a(){
        b();
}

function b(){
        throw new Exception("Foo");
}

a();


Expected result:
----------------
it should contain the full stack trace

Actual result:
--------------
the stack trace gets truncated


------------------------------------------------------------------------



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

Reply via email to