The specified CGI application misbehaved;
Moderator: General Moderators
The specified CGI application misbehaved;
The specified CGI application misbehaved by not returning a complete set of HTTP headers.
Running IIS:5
PHP4.3.3 (php.exe)
1) yes the page exists, using header('Location: http://www.mywebsite.com/');
2) yes I have tried header('Location: http://www.mywebsite.com/index.php');
3)yes check to see if file exists is checked, and not it does not fix the issue.
4) this problem only exists when using the EXE, not when using the isapi dll.
For what I read on teh release notes of 4.3.3 this issue should have been fixed, but I suppose since I am still using IIS the devs did not account for this.
Its very simple, page sends info to proccessing page, it then header() redirects back to the main site.. If I refresh the page all is well, all information was passed back, no data lose, session information intact, all works with in specified parameters... All that is except for the redirect.. and YES I can duplicate it.
I wold love to discover what the hell is going on here.. it works with no errors and no modifications to the code in redhat.. so it MUST be a IIS thing..
Running IIS:5
PHP4.3.3 (php.exe)
1) yes the page exists, using header('Location: http://www.mywebsite.com/');
2) yes I have tried header('Location: http://www.mywebsite.com/index.php');
3)yes check to see if file exists is checked, and not it does not fix the issue.
4) this problem only exists when using the EXE, not when using the isapi dll.
For what I read on teh release notes of 4.3.3 this issue should have been fixed, but I suppose since I am still using IIS the devs did not account for this.
Its very simple, page sends info to proccessing page, it then header() redirects back to the main site.. If I refresh the page all is well, all information was passed back, no data lose, session information intact, all works with in specified parameters... All that is except for the redirect.. and YES I can duplicate it.
I wold love to discover what the hell is going on here.. it works with no errors and no modifications to the code in redhat.. so it MUST be a IIS thing..
did you change that?php.ini wrote:; cgi.rfc2616_headers configuration option tells PHP what type of headers to
; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
; is supported by Apache. When this option is set to 1 PHP will send
; RFC2616 compliant header.
; Set to 1 if running under IIS. Default is zero.
;cgi.rfc2616_headers = 0
What version of PHP, the CLI or the CGI? It must be the CGI version in order to return the headers the webserver needs..
A quickfix is to add this to the top of your script:
echo "Content-Type: text/html\r\n\r\n";
but it wouldnt work very well if your script uses the header() function for other stuff, and it wont work when the script is used with another mod_php or cgi-php setup..
A quickfix is to add this to the top of your script:
echo "Content-Type: text/html\r\n\r\n";
but it wouldnt work very well if your script uses the header() function for other stuff, and it wont work when the script is used with another mod_php or cgi-php setup..
but you should if you use IIS, as mentioned by the comment. The default is cgi.rfc2616_headers=0 but you need
Code: Select all
cgi.rfc2616_headers = 1- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
That's IIS's default 'page not found', ie. 404 error for missing PHP scripts. To check whether that is the problem, start up Internet Services Manager, right click on your website in the list, select properties then the Home Directory tab, click configuration then select the PHP extension from the list and click edit. Then ensure that the 'Check file exists' check box is ticked and OK everything. You should now get a proper 404 if the PHP page is missing.The specified CGI application misbehaved by not returning a complete set of HTTP headers.
Mac
Please note my origanal post3)yes check to see if file exists is checked, and not it does not fix the issue.
And with that box checked there is no 404 page... as a matter of fact there should BE no 404 or any nother error page for that matter.. The page DOES exist, its the main index.php that is begin refrenced.
And note, the script works 100% in redhat.
And works with no errors when using the ISAPI dll ..
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
By relative I mean, instead of the absolute URL, e.g. http://www.mywebsite.com/index.php, you use the relative path to the page. So if for instance you were in a folder one up from the root directory, you would do:
This works fine using PHP 4.2 on IIS 4 and PHP 4.3.1 on IIS 5 (both on Win 2k).
Are you sending any other headers? Are you setting any cookies before doing the redirect?
Mac
Code: Select all
header('Location: ../index.php');Are you sending any other headers? Are you setting any cookies before doing the redirect?
Mac