Premature end of script headers: c:/php/php.exe

From: Date: Wed, 01 May 2002 15:03:26 +0000
Subject: Premature end of script headers: c:/php/php.exe
Groups: php.windows 
Request: Send a blank email to php-windows+get-13456@lists.php.net to get a copy of this message
I am having troubles with the following script. When executed I get the 500 internal server error page and an error: Premature end of script headers: c:/php/php.exe in the log files. If I comment out the header() line it works fine. I would like to redirect to the proper page based on login pass/fail. Can any one see what I am doing wrong? <? // Login script //authenticate using form variables $status = authenticate($f_user, $f_pass); // if user/pass is correct if ($status == 1) { //initiate a session session_start(); //register some session variables session_register("SESSION"); //including the username session_register("SESSION_UNAME"); $SESSION_UNAME = $f_user; //redirect to page header("Location: /worked.php"); //<-- problem area. exit(); } else // user/pass failed { //redirect to error page header("Location: /failed.php"); exit(); } ---snip---

« previous php.windows (#13456) next »