473,406 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

CGI-error and IIS

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.
Aug 11 '06 #1
7 4836
*** spark escribió/wrote (Fri, 11 Aug 2006 14:49:08 +0200):
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
--
Aug 11 '06 #2

"Alvaro G. Vicario" <we*******@NOSPAMdemogracia.comschreef in bericht
news:ou****************************@40tude.net...
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.
Aug 11 '06 #3
"spark" wrote:
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.
Aug 14 '06 #4
spark wrote:
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.
js*******@attglobal.net
==================
Aug 14 '06 #5

"Jerry Stuckle" wrote
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.
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.
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.
Aug 14 '06 #6
spark wrote:
"Jerry Stuckle" wrote

>>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.

>>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.

>>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.
js*******@attglobal.net
==================
Aug 15 '06 #7

"Jerry Stuckle" wrotespark wrote:
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.
Aug 15 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: DeepBleu | last post by:
When one is using an HTML form via a web broswer, the user submits the form contents and these are passed to a CGI Python script on the web server. I need to write a client script that connects to...
6
by: Geoff | last post by:
Here's the situation. I have a static html page which we want to update to include some dynamic content. I want a counter that keeps track of the number of times anyone presses the "add" button,...
0
by: David Staschover | last post by:
I'm trying to set up sessions in perl. The session is initialized fine in session1.cgi In session2.cgi, the correct session id is returned from the cookie, but when I initialize the session, a...
10
by: jason_box | last post by:
Hello, I was wondering if there was a way to have a javacript be activated by an input button that would call to a cgi program and querey every 10minutes and the cgi would update the page without...
14
by: ccdetail | last post by:
http://www.tiobe.com/index.htm?tiobe_index Python is the 7th most commonly used language, up from 8th. The only one gaining ground besides VB in the top 10. We're glad, our app is written in...
11
by: Cecil Westerhof | last post by:
I have a cgi-script dat uses the modules cgi, os, sys and time. Offcourse I can not time the time used to import time, but os and sys do not take more as a millisecond. My script itself takes 3 or...
4
by: thanawala27 | last post by:
I'm a beginner with perl/cgi. and im not ableto see the output of my cgi file on the browser.. Can anyone help me out. I have an html file...from which i want to go open a cgi file... ...
4
by: arorap | last post by:
I've mod_php installed with Apache 2.2. In one of my folders, I'm using the cgihandler as the PythonHandler as my target host runs python only as CGI. Here cgi.FieldStorage() doesn't seem to work....
2
by: poolboi | last post by:
hey guys, this is something on html and cgi taken from some example on the net but i got problem getting it work the html code is: <HTML> <HEAD> <TITLE>HTML Form...
0
by: d0353101 | last post by:
I am having login.cgi. user enter id and password. if ok it redirects to main.cgi with user_id as main_page.cgi?user_id=$user_id. main.cgi is having left menu and right part is for doing some...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.