Click to See Complete Forum and Search --> : CGI Error
The first time I run a sample script its fine. But if I close the browser and run the script again (or) I get:
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
What's wrong???
-Mike
The SAME thing has happened to me, and I cant get it working again. Hope someone can help us! :)
MIchelle
I think it may be a caching issue. I can access the page from another machine without any problems.
Mike
I tried accessing it from another location and I got the same error. And I dont think I made any changes that would affect it.. it just all of a sudden stopped working.. along with another php file i tried to run after it started happening.. Im frustrated cuz i need it to work again for a project at school
-Michelle
gardner1
02-15-2002, 02:30 PM
Hi Michelle,
are you 1000% sure nothing has changed?
" And I dont think I made any changes that would affect it.. it just all of a sudden stopped working.. along with another php file i tried to run after it started happening.. Im frustrated cuz i need it to work again for a project at school "
I can sense a slight hesitation when you say 'I dont think I made any changes' and since computers rarely just stop working... =)
anyway, check that httpd.conf and php.ini files are correct... Do other scripts work? Or none at all? What are the browser settings?
create a phptest.php file with the only contents
<?
phpinfo();
?>
and get the output and read it over very carefully.
anyway, GL.
gardner1
02-15-2002, 02:32 PM
oh, btw... are they are error messages?
can you try to echo "break01";
before and after, or do you get a white blank page... do you get any page at all? check the source code... if it outputs any kind of source but just a blank page, then PHP is working it's just choking on a code mistake.
Hi, thanks for responding..
I just recently started teaching myself php so I was destined to screw something up :) i still haven't a clue as to what I did to cause this error. All I know is, I had it working, then like a couple days of screwing around with it it stopped. I tried reinstalling php, etc. I changed some things, but I didnt think those things would affect this. A little background tho: I'm running this all on a win98 machine running microsoft pws (i know some of you here will *cringe* when you read that, i have been struggling to get my linux machine running the right way, but havent had much success) I messed with some stuff in the pws administrator, like changed a few folders' rights (read, executable, scripts) and changed them back again to the defaults. But I dont know if thats what did it or not, cuz i changed it all back.
i also have mysql running on this machine as well, trying to do some database stuff with php/mysql for a school project. i'd rather not have to use active server pages and microsoft access.
anyway, back to the problem. the error message i get when i try to access the php file from my browser is:
"CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:"
and it does not list any headers. I am not quite sure what this means, maybe someone here does... and can determine what it was I did wrong. No php files work whatsoever.. not even just a blank pg, its always that CGI Error thing. I hope i explained everything right...
Thanks, Michelle
Ok I switched to Apache web server .. now all i get is a blank page...
gardner1
02-15-2002, 11:05 PM
Ok,
first check that the php.ini file points to all the correct places/directories, and that the naming conventions are jiving.
for instance,
extension_dir = C:\php\extensions
This might be the first place where you might find an error.
I was about to say that adding Apache might confuse the whole matter also...
but check that first, and then check back.
if apache is starting w/ no error messages, then leave the httpd.conf alone for now... you do know you have to "start" apache first, right?... =)
I wouldn't groan about the PWS if it was working and you know for certain you havent changed anything re: PWS... it remains fairly transparent once it is alive and kicking, as opposed to Apache which opens a DOS box when started. (there is a way to get around that, but for now, lets just leave that alone.)
Ok, I added the extension dir thing to the php.ini and it WORKS.. thank you for your help!! I'm sure I'll be back with more problems :) hehe
Thanks,
Michelle
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.