Darwin engine and AppleScript in CGI's?

david bovill david at openpartnership.net
Thu Sep 1 06:17:23 EDT 2005


Can't get this to work at all this end - Darwin engine works fine  
except for alternateLanguage support - dragging  my shiny new  
licensed engine (same name & permissions - but only 1.9mb instead of  
2.6 for Darwin) - gives me internal server errors and

     INIT_Processeses(), could not establish the default connection  
to the WindowServer.

In the log. For me that is even with echo.mt

#!Revolution -ui
# This loops over all the environment variables
# set by the server when it runs a CGI application printing out
# its name and value.

on startup
# loop over all of the global variables, getting name and value
   repeat for each item i in the globals
    put i && "=" && value(i) & return after buffer
end repeat
# write minimal set of HTTP headers to stdout
   put it after buffer
   put "Content-Type: text/plain" & cr
   put "Content-Length:" && the length of buffer & cr & cr
   put buffer
end startup



On 31 Aug 2005, at 23:09, Mark Smith wrote:

> Ineresting. I did as you suggest, and it ran the 'echo' sample  
> script just fine, but trying to run a stack cgi got an error....

>>
>> I am betting here okay, but try pulling the executable out of  
>> MacOS X bundle and using it as the CGI engine, use it with the "- 
>> ui" parameter. It works fine. I just pulled mine, put it on / 
>> Library/WebSever/CGI-Executables and created this test.cgi script:
>>
>>
>> #!Revolution -ui
>> on startup
>> put "Engine Version:" && version() & cr
>> put "Languages:" && the alternateLanguages
>> get format("tell application \"Finder\"\ndisplay dialog \"Hello  
>> World!\"\nend tell\n")
>> do it as "applescript"
>> put it && the result
>> end startup




More information about the use-livecode mailing list