|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-05-27 01:47 UTC] 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 01:00:02 2025 UTC |
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); });