Stack's Name Being Changed When Used as CGI

J. Landman Gay jacque at hyperactivesw.com
Tue Sep 13 14:23:58 EDT 2005


Gregory Lypny wrote:
> Hello everyone,
> 
>     I'm using a stack as a CGI.  It's my first try and has been  going 
> well so far.  I have the stack open when I'm writing CGI  handlers, and 
> I test those CGIs at the same time by submitting forms  to be processed 
> from my web browser.  Naturally, this leads to some  anomalies in that a 
> CGI handler may save the stack, but the results  are obviously not 
> visible to me in the instance of the stack I'm  actually editing.  When 
> I then try to save the stack I'm working on,  that is, after submitting 
> a test web form, I sometimes get an error  from Revolution telling me 
> that it can't access the stack in  question.  The reason for this 
> appears to be that a tilde has been  appended to the stack's name, so 
> that myCGIStack.rev has become  myCGIStack.rev~.  I just want to confirm 
> that this is the result of  me working on the open stack at the same 
> time that web calls are  being made and not some sort of bug.  Can 
> anyone confirm this?

When Revolution saves it stack, it first renames the original with a 
tilde in front of the name. Then it tries to create new stack that 
contains your changes and saves that. If the save is successful, it 
deletes the tilde copy. If the save does not succeed, you still have the 
tilde copy as a backup; all you have to do is remove the tilde from the 
name and you are back in business (minus your most recent changes.)

If you are finding the tilde copy on your drive, that tells you that the 
save was not successful. You'll need to investigate why Rev can't save 
the stack. With CGIs, the most likely issue is permissions. For security 
reasons, CGI folders generally don't allow new files to be created 
inside of them. You can change the folder permissions so that new files 
can be created but that will open a security hole. You may be better off 
storing your stack in a different folder that does allow normal file 
operations.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list