Re: CGIs with MacOS 9.1 - problem
Re: CGIs with MacOS 9.1 - problem
- Subject: Re: CGIs with MacOS 9.1 - problem
- From: Jeffrey W Baumann <email@hidden>
- Date: Fri, 13 Apr 2001 19:44:38 -0500
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
The script "cart.hndl" is a library (44K when saved as run only) of
about 50 handlers shared by the 5 CGI scripts which make up my shopping
cart program. As per prior discussions on this list, I use the above
construct to enhance portability, rather than putting the library into a
property at compile time. Removing the run handler would necessitate
sacrificing portability.
The problem of "document contains no data" occurs even when the CGI has
been previously run and quit (thus retaining the script library in the
property cartHandler), so this does not appear to be a problem with the
time it takes to load the script object. Since I have removed the idle
handler, that cannot be the problem either. In fact, the only "benefit"
of removing the idle handler is that, once run, the CGI never quits.
You say your CGIs work with Web* 4.3/9.1/1.6. I wonder if there is some
subtle timing issue introduced with WebSTAR 4.4 (my upgrade went from
4.2 to 4.4). I will do some further testing on my dev server(s), and
with Personal Web Sharing.
Since the scripts appear to be working perfectly with Applescript 1.5.5,
I will stick with that for now on my live server. But I would really
like to solve this issue as it will be a serious impediment to my
planned year end release of cartHandle, especially if the problem occurs
with OSX.
Jeff Baumann
email@hidden/email@hidden (dual citizenship!)
www.linkedresources.com