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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help: CGI ERROR & PHP

Status
Not open for further replies.

BAYHAA

Programmer
Mar 24, 2001
7
US
Hi...

My problem is when I submit to some PHP files the following error occur:

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

What is the solution for the above problem?
 
That is a fairly generic error. When a CGI application sends a response to a browser, the first portion of the response must be a valid HTTP header. ' Best guess, is that there is a syntax error in your code and that the code is not actually running, but, is failing, thus, it does not produce the header and you get your error complaint.

HTH


keep the rudder amid ship and beware the odd typo
 
Hi...
I have windows 2000 advanced server, IIS5 , and PHP4.

I tested the same code with with other web server like "OMNIHTTPD and it works. but when i use IIS5, the cgi error occur.
The following problem occur when I want to move to some PHP file by the following type of link that has a query:
"admin3.php?fuser=$a&fpass=&b" .

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




Can you help to solve this problem,please?

Thanks..
 
If it runs on one machine with its web server and fails on a second, then I suggest the first two places to look are:

1 - paths - paths on the second machine may be different than on the first.

2 - make sure your code lives in a 'valid' cgi directory where the web server thinks it is legal to run cgi apps.

I live in a UNIX world, so, I'm sorry, I can give any specifics about using IIS. Maybe someone else can chime in here.

HTH


keep the rudder amid ship and beware the odd typo
 
I have been using IIS/PHP4 and I've been quite frustrate by this.

If you are linking one php document to another php document within the script, assure that you are directing it to the right path or it will return this error. Turn on "Check that file exists" under Server Properties, Home Directory, Configuration Button, App Mappings, .php, Edit Button. This way you will get a much more meaningful 404 not found instead of internal error.

However I still get the problem intermittently on working scripts! If you reload the browser 10 times.. it will display "CGI Error" occur 3 times, the rest it will be successful.

accessing the page via or will fail almost 75% of the time. However its successful almost 100% from remote computers UNLESS you click the reload button a few times.

Truth is, I don't know! $#*(
 
Could this be your problem or a typo in your post?

From:
[tt]
admin3.php?fuser=$a&fpass=&b
[/tt]

To
[tt]
admin3.php?fuser=$a&fpass=$b
[/tt]

I would assume a typo. I would suggest installing PHP Traid, which installs Apache, PHP, and mySQL. You can download it at and it works perfectly.

It doesn't have the lastest version of Apache, but that is easy to download and install. I would also suggest getting Apache 2.0 as it has awesome Win2k support.

Hope this helps.

-Vic vic cherubini
krs-one@cnunited.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash
====
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top