Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The specified CGI application misbehaved

Status
Not open for further replies.

storm197

MIS
Oct 9, 2002
55
CA
Don't know if this problem have been solved (the search engine is not working) but when I use the function header() in PHP, i'm getting the error

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: "BLANK"

I'm using PHP 4.3.8, on IIS, Win2k.

Anyone can redirect me to the solution ?
 
What headers are you sending? We need a little more information when it happens, under what circumstances, what code you have etc.
 
Here is a sample code that does it.

<?php
session_start();

if ($_SESSION['allowed'] <> 1)
{
header("location: ../refused.php");
}
?>

Funny because if I refresh the browser, then it works.

Everything was working fine on
 
Try:

<?php
[red]header ('Content-Type: text/html');[/red]
session_start();

if ($_SESSION['allowed'] <> 1)
{
header("location: ../refused.php");
}
?>


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I'm able to solve the problem by using the ISAPI module instead of the CGI binary in IIS as described on PHP.NET.

Anyone can told me it this involve any major changes for my application ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top