Re: Handling a CGI
Re: Handling a CGI
- Subject: Re: Handling a CGI
- From: email@hidden
- Date: Thu, 8 Nov 2001 12:19:16 EST
Steve,
Read this page, then post further questions if any remain.
http://www.linkedresources.com/teach/applescript/writingCGIs.shtml
Jeff Baumann
email@hidden
www.linkedresources.com
In a message dated 11/8/01 12:23:26 AM, Steve Thompson wrote:
>
I have a requirement to create a CGI that produces a page of output as
>
HTML. I can't get 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