PHP header() call “crashing” script with HTTP 500 error [duplicate]
问题 This question already has answers here : header(“location”) causes [500] internal server error? (4 answers) Closed last year . I use PHP 5.2.9. To see/log errors, at the beggining of my script I have: error_reporting(E_ALL | E_STRICT); ini_set('display_errors', 'On'); ini_set('log_errors', 'On'); ini_set('error_log', $_SERVER['DOCUMENT_ROOT'] . '/php.log'); But when I use the first of the next two lines, my script issue a HTTP 500 error, and nothing is displayed (except the 500 error) and