Connecting Tech Pros Worldwide Help | Site Map

CGI-error and IIS

  #1  
Old August 11th, 2006, 01:45 PM
spark
Guest
 
Posts: n/a
Version 5.1.4 on Server 2003 IIS.
A virtual host.
So I am getting these 502 errors with messages saying "The specified CGI
application misbehaved by not returning a complete set of HTTP headers."
These errors have been reported since 2001 or even earlier.
My host says to wait for a stable version of PHP. Which is a silly thing to
say IMO.
My questions:
- Is this still a known bug? Either in IIS or PHP even in V5.1.4?
- Is there a workaround?
- So I have stumbled across a delay function. The problem used to be timing
related. Would that be effective?
- Any other options or thoughts, except migrating to Apache? :)

Thanks in advance!

Spark.


  #2  
Old August 11th, 2006, 09:25 PM
Alvaro G. Vicario
Guest
 
Posts: n/a

re: CGI-error and IIS


*** spark escribió/wrote (Fri, 11 Aug 2006 14:49:08 +0200):
Quote:
So I am getting these 502 errors with messages saying "The specified CGI
application misbehaved by not returning a complete set of HTTP headers."
Just speculating... Maybe CGI is configured to run the command line
interface, which does not generate headers :-?


--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
  #3  
Old August 11th, 2006, 09:55 PM
spark
Guest
 
Posts: n/a

re: CGI-error and IIS



"Alvaro G. Vicario" <webmaster@NOSPAMdemogracia.comschreef in bericht
news:ou0u63ntcsjj.16j33dwhafhrb.dlg@40tude.net...
Quote:
Just speculating... Maybe CGI is configured to run the command line
interface, which does not generate headers :-?
Don't think so. In that case the errors would be consistent.
These errors seem to occur at random.
Thanks for the input though.

Spark.


  #4  
Old August 14th, 2006, 07:15 AM
spark
Guest
 
Posts: n/a

re: CGI-error and IIS


"spark" wrote:
Quote:
Version 5.1.4 on Server 2003 IIS.
A virtual host.
So I am getting these 502 errors with messages saying "The specified CGI
application misbehaved by not returning a complete set of HTTP headers."
These errors have been reported since 2001 or even earlier.
My host says to wait for a stable version of PHP. Which is a silly thing
to say IMO.
My questions:
- Is this still a known bug? Either in IIS or PHP even in V5.1.4?
- Is there a workaround?
- So I have stumbled across a delay function. The problem used to be
timing related. Would that be effective?
- Any other options or thoughts, except migrating to Apache? :)
Bump.
So looking at all these replies :) there are a few possible conclusion:
-Nobody knows;
-Nobody cares;
-Nobody has site site on an Windows-based platform;
-Nobody has encountered this problem.
Maybe a few more.
So assuming the first 3 can't be true, I take it then, that the old problem
is solved in PHP 5.1.4?
If that is the case, then why are these errors occuring?

Imagine having a website with about 10% of the hits returning a 502. I've
had that a few days back. This is just disastrous....
Things are more stable now, but I am worried.
So let's be more specific.
On almost every page I have:

<?php ob_start("ob_gzhandler"); ?>

I have a stylesheet page called styles.php with the header:
<?php header("Content-type: text/css; charset=UTF-8"); ?>
Called from every page with:
<link rel="stylesheet" type="text/css"
href="http://www.mydomain.com/stylesheet.php?pageID=<?php echo $pageID; ?>">
$pageID is a variable with which I determine which colors to use. These data
are stored in MySQL.
Any flaws in this?

Thanks voor your thoughts.

Spark.


  #5  
Old August 14th, 2006, 12:35 PM
Jerry Stuckle
Guest
 
Posts: n/a

re: CGI-error and IIS


spark wrote:
Quote:
Version 5.1.4 on Server 2003 IIS.
A virtual host.
So I am getting these 502 errors with messages saying "The specified CGI
application misbehaved by not returning a complete set of HTTP headers."
These errors have been reported since 2001 or even earlier.
My host says to wait for a stable version of PHP. Which is a silly thing to
say IMO.
My questions:
- Is this still a known bug? Either in IIS or PHP even in V5.1.4?
- Is there a workaround?
- So I have stumbled across a delay function. The problem used to be timing
related. Would that be effective?
- Any other options or thoughts, except migrating to Apache? :)
>
Thanks in advance!
>
Spark.
>
>
I use the isapi version with Windows, and it works fine. I've been
using it since early PHP4, and have upgraded regularly (currently using
5.1.2). Used them on both W2K and W2K3.

If it's configured correctly, the only thing I've seen cause problems is
bad PHP code causing an abnormal termination of the PHP thread/process.
No, it shouldn't happen since PHP is interpreted, but it sometimes
does. And every time I've seen it happen it's been bad (invalid) code
that screws up the parser.

But again - I don't use the CGI version. It's performance isn't as good
as the isapi version, IMHO.

My suggestion - if it's not your code and your host can't get their end
working, find another host.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  #6  
Old August 14th, 2006, 05:35 PM
spark
Guest
 
Posts: n/a

re: CGI-error and IIS



"Jerry Stuckle" wrote
Quote:
I use the isapi version with Windows, and it works fine. I've been
Yup, that's what the hoster suggested. The only thing was, that it too had
some error: it didn't recognize "mysql_pconnect".
He fixed that.
Quote:
If it's configured correctly, the only thing I've seen cause problems is
bad PHP code causing an abnormal termination of the PHP thread/process.
Because of the new isapi settings he also turned on some error messaging,
which revealed a mistake (I am not ready to admit that forgetting some
quotes was a blunder :) ).
But it sure wasn't the cause of the malfunction.
Quote:
My suggestion - if it's not your code and your host can't get their end
working, find another host.
Thanks for the reassuring words.
We'll wait and see what the isapi setting will do.
The hosting company has an excellent helpdesk service, they helped me out
often enough and these guys are alright.

Cheers,

Spark.


  #7  
Old August 15th, 2006, 03:35 AM
Jerry Stuckle
Guest
 
Posts: n/a

re: CGI-error and IIS


spark wrote:
Quote:
"Jerry Stuckle" wrote
>
>
Quote:
>>I use the isapi version with Windows, and it works fine. I've been
>
>
Yup, that's what the hoster suggested. The only thing was, that it too had
some error: it didn't recognize "mysql_pconnect".
He fixed that.
>
>
Quote:
>>If it's configured correctly, the only thing I've seen cause problems is
>>bad PHP code causing an abnormal termination of the PHP thread/process.
>
>
Because of the new isapi settings he also turned on some error messaging,
which revealed a mistake (I am not ready to admit that forgetting some
quotes was a blunder :) ).
But it sure wasn't the cause of the malfunction.
>
>
Quote:
>>My suggestion - if it's not your code and your host can't get their end
>>working, find another host.
>
>
Thanks for the reassuring words.
We'll wait and see what the isapi setting will do.
The hosting company has an excellent helpdesk service, they helped me out
often enough and these guys are alright.
>
Cheers,
>
Spark.
>
>
OK, and BTW - I wouldn't recommend using mysql_pconnect() unless you are
doing dozens of connections per second. Otherwise using it keeps a lot
of unused resources allocated all the time.

I have yet to see a website using MySQL where mysql_pconnect() is
worthwhile. I'm sure they exist - but I haven't run into anything
nearly that heavy usage.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  #8  
Old August 15th, 2006, 07:05 AM
spark
Guest
 
Posts: n/a

re: CGI-error and IIS



"Jerry Stuckle" wrotespark wrote:
Quote:
OK, and BTW - I wouldn't recommend using mysql_pconnect() unless you are
doing dozens of connections per second. Otherwise using it keeps a lot of
unused resources allocated all the time.
>
I have yet to see a website using MySQL where mysql_pconnect() is
worthwhile. I'm sure they exist - but I haven't run into anything nearly
that heavy usage.
A standaard in dreamweaver. I never thought of looking into that. I will
though.
(Chapter 41 on php.net :) )

The site is now running flawlessly, so far...

Thanks again,

Spark.


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
IIS on Vista home premium? Steven Spits answers 51 July 4th, 2008 07:15 AM
create cgi-bin ? Michael Tissington answers 3 June 27th, 2008 09:02 PM
ASP.NET & cgi Mark Rae answers 6 November 18th, 2005 06:33 PM
IIS 5.0 CGI XML Rich J answers 0 November 11th, 2005 10:50 PM
CGI vs. ISAPI Vince Hurst answers 0 July 17th, 2005 02:45 PM