Jacque tutorial - save form data to stack

J. Landman Gay jacque at hyperactivesw.com
Tue Sep 9 16:45:34 EDT 2008


Jim Sims wrote:
> 
> After more testing, it seems that is is being set but the stack is just 
> not getting saved.
> This is on OS X Leopard.
> 
> I can put the data into a text file in the CGI-Executables dir  with no 
> problem.
> 
> I cannot save a stack in the CGI-Executables dir after setting a custom 
> property.

Right. Your best bet is to put your stack outside the CGI directory in a 
folder that has permissions for you to create files.

When Rev saves a stack it first makes a backup copy of the original, 
then saves the stack, then if all goes well it deletes the backup. 
That's so that if the save doesn't work, the backup copy is available. 
The CGI folder will not allow you to create new files in it, which is 
why the save is failing; Rev can't make its backup. The text file 
approach works because it isn't making any copies of itself.

It's a security hole to set the permissions on the CGI folder to allow 
file creation, so don't do that. Either change your method to use a text 
file to keep the data, or else move the stack to another folder that 
does allow file creation. You can still access the stack in your CGI 
script even if it isn't in the same folder, just supply the correct file 
path to it.

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



More information about the use-livecode mailing list