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:
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
Previous Comments:
------------------------------------------------------------------------
[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?
------------------------------------------------------------------------
[2013-05-27 06:19:07] [email protected]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
------------------------------------------------------------------------
[2013-05-27 01:52:14] matteosistisette at gmail dot com
And this is even at runtime!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Part of my code gets executed, and then the 500 error is produced.
I even have an error handler that prints a stact trace, and doesn't work in
this
case, so the error is fatal or anyway unhandable.
However it should ALWAYS show up on error log with an error message.
This is unbelievable.
------------------------------------------------------------------------
[2013-05-27 01:47:07] matteosistisette at gmail dot com
Description:
------------
I have no idea what's triggering this, certainly some error of mine in my php
code, however, in very rare cases I'm getting 500 internal server errors which
are logged as such in apache's access_log, but don't log ABSOLUTELY ANYTHING in
PHP's error log, not even a fatal error or parse error.
I only get an empty 500 response from the server.
Such a thing must never, ever, ever happen, no matter what, if the error is
caused by php code.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64924&edit=1