PHP 4.0 Bug #8744: call to header() causes CGI error
| From: | emily at crytech dot com | Date: | Tue, 16 Jan 2001 19:07:45 +0000 |
| Subject: | PHP 4.0 Bug #8744: call to header() causes CGI error | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-44266@lists.php.net to get a copy of this message | ||
From: emily@crytech.com
Operating system: Windows 2000
PHP version: 4.0.4pl1
PHP Bug Type: IIS related
Bug description: call to header() causes CGI error
Our situation is similar to that in bug report 8571, particularly situations 1 and 2. After adding,
updating or deleting a record to a MSSQL database, the user is referred to this function (stored in
file which is included in each page):
function pageRedirect($inURL) {
header("Location: $inURL");
exit;
}
$inURL is never exactly the same as the current URL - either you are redirected to a completely
different file name, or to the same file name with a different query string appended.
The record modification part always completes successfully in MSSQL, and the header() function sends
the user to the new URL, but this error occurs:
[start]
CGI ERROR
CGI application misbehaved by not returning a complete set of headers. The headers that it
did return are:
[end]
... and any code in the page that the user has been redirected to is NOT executed. If the user
clicks refresh, it does and all is well.
This is a PHP web application being ported from a Linux/mySQL environment, where it works, so it
appears to be an IIS-specific issue.
Thanks in advance for any feedback.
--
Edit Bug report at: http://bugs.php.net/?id=8744&edit=1