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

 ID:                 64924
 Comment by:         matteosistisette at gmail dot com
 Reported by:        matteosistisette at gmail dot com
 Summary:            500 internal server error caused by PHP  but nothing
                      logged  in error log
 Status:             Not a bug
 Type:               Bug
 Package:            *Web Server problem
 Operating System:   ubuntu 12.10
 PHP Version:        5.4.15
 Block user comment: N
 Private report:     N

 New Comment:

However, the isolated string offset error alone does not trigger the crash, it 
gets stack-traced correctly by my error handler.

The same error inside a stack of method calls triggers the issue. Unfortunately 
I 
haven't been able to isolate a minimal code that will let you reproduce the 
issue, I do can reproduce it 100% systematically but with complex code + 
database 
and complicated sequence of steps of which I have no idea what is relevant to 
the 
issue.


Previous Comments:
------------------------------------------------------------------------
[2013-05-27 15:07:50] matteosistisette at gmail dot com

I'll try to post the error handler replacing the [at] character with [at] (you 
get what I mean), let's see if that is what bothers the antispam...


set_error_handler(function($errno, $errstr, $errfile, $errline){
    http_response_code(500);
    header("Content-Type: text/plain");
    $backtrace=debug_backtrace();
    $output="$errstr \n [at] $errfile($errline)\n";
    foreach ($backtrace as $i=>$item) {
        if ($i>0) $output.= "#$i. [at] ".$item['file']."
(".$item['line']."): ".(isset($item['class'])?
$item['class']:'')."::".$item['function']."(".(is_array($item['args'])?
[at]implode(",",$item['args']):'').")\n";
    }
    die($output);
});

------------------------------------------------------------------------
[2013-05-27 14:50:28] matteosistisette at gmail dot com

And you definitely do need to see it before you can say what you are saying

------------------------------------------------------------------------
[2013-05-27 14:49:14] matteosistisette at gmail dot com

No man, my error hanler sends a 500 AND prints a stack trace.
I've had thousands of errors in my code before, and my error handler correctly 
printed a stack trace.

And if there was an error in my error handler, then the PHP error should be 
normally logged in the error_log. NOTHING is logged in the error_log, that 
seems 
to indicate PHP is crashing.
No matter how bad is my error handler, if it crashes PHP there's a bug in PHP

------------------------------------------------------------------------
[2013-05-27 14:44:43] ras...@php.net

There is no bug. Your custom error handler is explicitly sending a 500. We do 
not 
need to see it.

------------------------------------------------------------------------
[2013-05-27 14:33:28] matteosistisette at gmail dot com

spam spam spam spam spam spam spam spam spam spam spam 

Now my next comment will be the code, which is valuable information to fix the 
bug, but it won't let me post it

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=64924


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

Reply via email to