Handling a CGI
Handling a CGI
- Subject: Handling a CGI
- From: Steve Thompson <email@hidden>
- Date: Wed, 7 Nov 2001 15:38:46 +0000
I have a requirement to create a CGI that produces a page of output as
HTML. I can't egt it to work and can't work out why!
To begin with, I created a script that does all the calculations
required and then outputs the results to a text file. This worked
perfectly.
So, for my next trick, I added "on handle CGI request" at the beginning
and "end handle CGI request" at the end. I then replaced the routine
that writes to a file with a return statement containing the output
embedded in a bit of HTML
I then saved the file as pairerquery.cgi, a classic applet with never
show startup screen and stay open checked.
When I access
http://10.5.0.150/pairerquery.cgi, the applet launches on
the server (IP 6) but it doesn't start doing it's things (if it was,
there's be application windows opening and closing). Eventually, the web
browser times out with a 502 Bad Gateway error.
I have tried a couple of CGI examples I have found - these all involve
passing the CGI arguments from a POST query on the page.
So, I'm assuming the approach for getting a CGI to create a page without
passing it any data is not as simple as just ignoring the data. I get
the impression that what's happening is that indypairer.cgi is launching
and then it's waiting for an argument to be sent to it?
Could anyone point me in the right direction or tell me how I should be
doing this?
TIA
Steve