• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
applet CGI / Filemaker / timeout
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

applet CGI / Filemaker / timeout


  • Subject: applet CGI / Filemaker / timeout
  • From: Philippe Billotte <email@hidden>
  • Date: Thu, 14 Jun 2001 12:46:08 +0000

Hello


I have written an applet CGI that sends a request to Filemaker
(running on the same computer) to get the names of open databases and
return the names in an HTML page. The acgi is located in the cgi-bin
folder of Webstar.

My configuration :
MacOs 8.6 / Blue G3
Webstar 3.02
Filemaker Pro 4

Everything works ok as long as I select "stay open" when saving the
applet. I get the HTML page and the file listing within a 5 seconds
delay.

But if I do not select "stay open", the CGI quits too quickly (2
seconds) and I get a CGI timeout error. Various documentations I have
read recommends to let the CGI applet stay open, by I need to stop it
after execution, in order to be able to replace the applet file
(which is not possible if the applet is still running). This applet
is tested on a local setup, but final implementation will be on a
remote computer with no physical access.

I have played with the "with timeout" instruction with no success.
This problem seems to be related to the "on handle CGI request"
handler. Why does the applet quits wthout waiting for Filemaker's
response ?

Here is the script:

property crlf : (ASCII character 13) & (ASCII character 10)

property http_header : "HTTP/1.0 200 OK" & crlf & "Server: WebSTAR 3"
& crlf & ,
"MIME-Version: 1.0" & crlf & "Content-type: text/html" & crlf & crlf

property HTML_opening : "<HTML>" & return & "<HEAD>" & return &
"<TITLE>CGI Results</TITLE>" & return & ,
"</HEAD>" & return & "<BODY>" & return

property HTML_closing : "</BODY>" & return & "</HTML>"

on handle CGI request

tell application "FileMaker Pro "
activate
try
set numbases to the count class database
set listebases to ""
repeat with i from 1 to numbases
set nombase to the name of database i
set listebases to listebases & "<br>" & nombase
end repeat
set return_body to "<h2>Liste des bases ouvertes</h2>"
set return_body to return_body & "<br>" &
"<h3>nombre de bases : " & numbases & "</h3>"
set return_body to return_body & listebases
set return_body to return_body & "<br><h3>fin
de liste</h3<br>"
on error texte number numero
set return_body to "Erreur" & numero & "," & texte
end try
end tell

set return_page to http_header & HTML_opening & return_body &
HTML_closing
return return_page

end handle CGI request


Does anyone have a clue ?
I have been stuck on this for 2 days
Thanks
--
P. Billotte
Atlasnet dipartement Marocnet
Immeuble CNIA
216, bd Zerktouni
Casablanca

tel (212) 22 29 55 33
fax (212) 22 29 51 33

mailto:email@hidden
http://www.marocnet.net.ma/


  • Follow-Ups:
    • Re: applet CGI / Filemaker / timeout
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Script to copy changed files?
  • Next by Date: simple question
  • Previous by thread: Re: How to 'load' osaxen
  • Next by thread: Re: applet CGI / Filemaker / timeout
  • Index(es):
    • Date
    • Thread