php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12358 CGI Error-CGI application misbehaved
Submitted: 2001-07-25 05:58 UTC Modified: 2001-08-20 12:04 UTC
From: suresh_inbox at rediffmail dot com Assigned:
Status: Closed Package: PWS related
PHP Version: 4.0.6 OS: windows 98
Private report: No CVE-ID: None
 [2001-07-25 05:58 UTC] suresh_inbox at rediffmail dot com
I has installed php4.0 from www.php.net.My os is windows 98 and i am using PWS.when I run any php program in browser I am getting the following error

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


whn I run php.exe in dos prompt I am getting the html file correctly.While running in the browser,I am getting the above error.

Any body please help me
My email id is suresh_inbox@rediffmail.com
bye
suresh

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-25 06:30 UTC] cynic@php.net
provide a short example script, and it's output when run from the command line. save this as test.php:

<?php echo "hello world!\n" ?>

and see what you get. it should be st. like this:

c:\temp>php test.php
X-Powered-By: PHP/4.0.7-dev
Content-type: text/html

hello world!

c:\temp>

If that's ok (i. e. the first three lines are the same as shown above, I suggest you turn on logging errors in php.ini, request a PHP script thru PWS, and check the error log.
 [2001-08-20 12:04 UTC] sniper@php.net
no feedback.

 [2002-06-25 03:55 UTC] renghen at servihoo dot com
set cgi.force_redirect=0 in your php.ini
 [2003-01-13 20:00 UTC] martinbudden at hotmail dot com
I'm getting the same problem.  It's not about setting cgi.force_redirect=0 in php.ini, that was for a different problem and that one is now fixed.

So what is causing this error?  Any help greatly appreciated!
CGI Error
The specified CGI application misbehaved by not returning a complete set
of HTTP headers. The headers it did return are:
 [2003-01-20 08:49 UTC] parryk at croner dot co dot uk
it's a bit late now, but maybe someone else will come look for answers here...

The CGI error can be solved by opening PWS, clicking on the Advanced button, and adding the folder where your scripts reside to the vitual directories tree (don't forget to enable the execute option by ticking the box).
 [2003-04-03 18:38 UTC] baje14 at eudoramail dot com
i also have the same problem please please please help us!
 [2003-04-05 11:26 UTC] powerorb at gmx dot de
Hi All,

I had the same error all the time. In my case it were the Security-Settings inside the webroot. There need to be a entry like IUSR_XXXX (XXXX is the name of your computer). Give this user at least rights to read the directory.
 [2003-09-09 11:21 UTC] pachecodario at hotmail dot com
I think this problem is caused when the php is for Apache running with IIS on Windows 2000.  

It can be solved downloading the version for windows (Version 4.3.3, available in www.php.net).  Installing that version it works, if you are running with IIS on Win XP it is necessary to set cgi.force_redirect=0 in your php.ini.

I hope it can be the solution.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu May 06 21:01:24 2021 UTC