CGI Error on Windows Server

Hi,

I’m setting up phpVMS for a friend of mine on a Windows Server package we just bought (shared between a couple of FS sites)

It is running PHP5 and MySQL v5..the install went flawlessly, but only the home page works.

Every time I try to login or visit any page (i.e. index.php/<any page here>), I get this:

CGI Error

The specified CGI application misbehaved by not returning a complete set of HTTP headers.

I suspect its a Windows Server issue, but I thought I’d ask…is there any way this can be fixed??

Hey,

Welcome to the forums.

Just did a quick google search on that error, this might help;

http://www.gidforums.com/t-1513.html

http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=uNO&q=php+The+specified+CGI+application+misbehaved+by+not+returning+a+complete+set+of+HTTP+headers.&btnG=Search

I guess you’re using IIS on Windows? I usually use Apache, but Google will be of some better help. I remember once getting a similar error, but setting PHP as an ISAPI extention yielded better results (and was faster too)

Yeah it is running IIS, and unfortunately its on a shared host, so I doubt they’ll be willing to change their server setup…any other ideas?

I would send a message to your host.

Do you use Plesk?

https://desk.hostdime.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=93

I’ve already sent a ticket, waiting for a reply on it. They use H-Sphere

If you do a “info.php” file with this in it:

<?php

phpinfo();

?>

Does that give the same error?

It only happens when you click a link from the home page.

Its a fresh install of phpVMS, just downloaded today. Installed it, and went to login to the admin panel.

It tries to open a path like www.domain.com/index.php/registration

Is that even a valid path?

I’d switch to a Linux host if possible, reading on the wordpress forums about alot of issues with FastCGI on windows:

http://wordpress.org/support/topic/150484

But hopefully you can get it resolved without that

It only happens when you click a link from the home page.

Its a fresh install of phpVMS, just downloaded today. Installed it, and went to login to the admin panel.

It tries to open a path like www.domain.com/index.php/registration

Is that even a valid path?

The parser only looks uptil the .php, the rest goes into the query string which I parse for the different peices. But yep, it’s valid

Saw this post,

MichaelH

Moderator

Posted 1 year ago #

Saw recently with one host, www.hostnexus.com, that with their Plesk control panel, they allowed PHP, via a check box, to run as an ISAPI extension. WordPress 2.3.3 installed just fine.

I’m going to see if they can run PHP as an ISAPI extension…that Plesk link you posted said it can be done for one domain (at least with Plesk)…I looked for a similar setting, all I can do is switch it from PHP5 to PHP4. I’ll send another note with the support ticket about it and see what they say.

Thanks!

No problem, good luck

I don’t suppose its something that can be changed with the PHP.ini file? The host allows me to define one in the domain root.

Forgive me if Im wrong..I know jack about PHP  ;D

Nabeel, here is the reply from the webhost…

Hi,

I don’t believe that CGI or ISAPI would make a difference. Usually these errors are caused by URL rewriting. Your script seems to be more geared for a Linux server running Apache.

As a test, I switched your site to ISAPI and it still did not work, but didn’t show the CGI error anymore.

I left it like that for now for you to see.

Then, like an idiot, I accidentally touched the PHP setting in the control panel and it reverted back to CGI! :

I’m waiting for them to change it back, but in the meantime, I thought I’d let you know what happened. Just before the php setting got reverted, I tried loading the site again, and I got a plain blank screen when just trying to view the home page.

I thought maybe once they switch it back, I should re-install phpvms…necessary?

Revert it to ISAPI, we’ll see if there are any errors being thrown with the blank screen. I’m not sure if it’s through the php.ini. But good to know you can edit that, if need be.

I’m not using any URL rewriting though. I think we have a few people running on IIS with PHP, they haven’t had any problems though. But revert it and we can go from there

Ok, they’ve reverted it again.

How can I check for any error messages?

EDIT: I tried to go reinstall it, and the installer just gives a blank screen too.. ???

Hmm, ok. Open index.php,  above this line:

include ‘core/codon.config.php’;

Add:

error_reporting(E_ALL);

ini_set(‘display_errors’, ‘on’);

Then run index.php, let’s see if any errors show

Also, in your php.ini, turn error reporting on

Doesnt print anything ???

add it also into the core/codon.config.php

Can you PM me your ftp info, I can check it out as well