Re: CGIs with MacOS 9.1 - problem
Re: CGIs with MacOS 9.1 - problem
- Subject: Re: CGIs with MacOS 9.1 - problem
- From: What does not kill you only makes you stronger <email@hidden>
- Date: Mon, 16 Apr 2001 00:15:13 -0500
on 04.13.01 7:44 PM, email@hidden wrote:
>
On Friday, April 13, 2001, at 01:13 PM, cris wrote:
>
>
...snip...
>
>
> Hm, my server is running W* 4.3, OS 9.1, AS 1.6. But my CGI's do also
>
> properly respond when they are not already running.
>
>
>
> OK, i played now a bit with my cgis (thanks to Timbuktu):
>
> When you call a cgi, it first executes the run and the idle handler.
>
> Do you
>
> have a return statement in the run handler? Is there a difference if you
>
> remove both handlers entirely?
>
>
I tried using a return statement at the end of the run handler and had
>
minimal success (it behaved correctly once, not thereafter.
>
>
Removing the run handler would be a serious hardship. Here is the
>
handler:
>
>
property cartHandler : "empty"
>
>
on run
>
if cartHandler is equal to "empty" then
>
try
>
set basePath to (":" as alias) as string
>
set cartHandlerSrc to (basePath & "cart.hndl") as string
>
set cartHandler to load script file (cartHandlerSrc)
>
on error
>
set cartHandler to "empty"
>
tell me to quit
>
end try
>
end if
>
set lastused to 0 -- unnecessary now with no idle handler to self quit
>
return -- just added for testing purposes on Cris' suggestion
>
end run
I just ran across the same thing a few nights ago. The link would launch
the cgi, but never continue past that. Clicking the link again (or making
sure the cgi was runing first, seemed to solve.) Interestingly enough, I
pasted the code into FaceSpan, saved as an application, and the script will
launch, run, and send back the proper data. (IE: all is normal.)
I also needed the 'on run' handler, due to loading libraries..
DP G4 500, Mac OS 9.1, AS 1.6.
I believe the script was saved as a stay open/run only Mac OS X Applet. I
did not try saving as a Classic Applet. (yet)
Nate