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:
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
Previous Comments:
------------------------------------------------------------------------
[2013-05-27 14:32:29] [email protected]
.
------------------------------------------------------------------------
[2013-05-27 14:32:15] matteosistisette at gmail dot com
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.
------------------------------------------------------------------------
[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] [email protected]
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
------------------------------------------------------------------------
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