This won't stop the earth rotation, but I've come across an annoying bug that I'm having difficulties to identify precisely.
Fact:
define('SAVEQUERIES', true); in my wp-config.php makes everything break with an Error 500.
Symptoms:
Error 500, log says "Premature end of script headers: /dh/cgi-system/php5.cgi" which means basically anything.
Culprit:
Function get_caller() in wp-db.php is the one causing the error. In that function, this particular line is to blame: $bt = debug_backtrace();
No clue why debug_backtrace() break things, though, and @debug_backtrace() doesnt help.
Server specs:
PHP 5.2.3, Apache running CGI/FastCGI, whole phpinfo()
This ticket is mostly for the record if anyone happens to search here for the same problem, even if it's going to get a wontfix/worksforme/cantreproduce. Cheers :)