can't say "create stack" in a CGI?

Richard Gaskin ambassador at fourthworld.com
Tue Nov 25 22:26:15 EST 2008


Phil Davis wrote:
> I'm just doing a reality check for what I observe in my CGI world: you 
> can't use Rev's "create stack" command when running in a windowless 
> environment (e.g. on a remote server with the -ui flag).

So I've not had difficulty creating any object or modifying any 
properties of any object in a CGI.

I just double-checked this script on my Dreamhost server and it created 
the specified stack file:


#!mc -ui

on startup
  put "Content-Type: text/html" & crlf &\
       "Content-Length:"&& length("Hello") & crlf & crlf
  create stack "teststack"
  set the filename of stack "teststack" to "./dd/ttt.mc"
  save stack "teststack"
  put "Hello"
  quit
end startup


One thing to note is that sometimes cgi-bin folders are set up with 
permissions that prevent new files from being created within them.  If 
that's what your script was trying that might be the issue. Try a 
sub-folder instead.

-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com



More information about the use-livecode mailing list