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:             Feedback
 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:

It's unbelievable. I can post any sort of stupid blah bla blah, but if I try to 
paste a snippet of code it rejects it at spam.


Previous Comments:
------------------------------------------------------------------------
[2013-05-27 14:31:30] matteosistisette at gmail dot com

Good catch.

It's almost certainly the error handler.

However, while I try to paste the code here, this broken bugtracker keeps 
rejecting it as spam.

------------------------------------------------------------------------
[2013-05-27 14:01:11] ras...@php.net

I really doubt this is crashing PHP. I would have a look at any custom error 
handler you have in place and look at what it does with Illegal Offset 
warnings. 
This is a new warning in PHP 5.4 which you get if you try to use a string as if 
it was an associative array, since this is what you are doing in this case.

------------------------------------------------------------------------
[2013-05-27 11:19:47] matteosistisette at gmail dot com

SUPER LOL

What is triggering the crash is this code:

  $info="SELECT offset,height FROM segment ORDER BY id DESC limit 1";
  $offset=$info['offset']+$info['height'];

Obviously the code is screwed up (I use the query string as if it was the 
result 
from a query!!) but it's crashing PHP instead of triggering an error.

Curiously enough, though, this only happens inside the true intricated code and 
not if isolated.
Anyway I can 100% assure these are the lines of code that trigger the crash

------------------------------------------------------------------------
[2013-05-27 10:41:20] matteosistisette at gmail dot com

It seems too damn complicated to get a backtrace.
Php (and any program for that matter) should be built in such a way that if it 
crashes, there would be a file somewhere ready to pick!

------------------------------------------------------------------------
[2013-05-27 10:37:59] matteosistisette at gmail dot com

Apparently my php is configured with --disable-debug.
How do I get a debug-enabled version?

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


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