Still having problems with rev as CGI
J. Landman Gay
jacque at hyperactivesw.com
Wed Dec 1 20:39:28 EST 2010
On 12/1/10 6:00 PM, Alex Tweedly wrote:
>
> Thanks to those who helped me get rev running as CGI on on-rev.
>
> Unfortunately, although I can run basic scripts, I am having trouble
> getting those scripts to access other stacks.
>
> I have the script, and the other stack, in my cgi-bin folder, with
> permissions set to 755
> Here's the script
>
>> #!revolution -ui
>>
>>
>> on startup
>> put "Content-Type: text/plain" & cr & cr
>>
>> put the detailed files into t
>> filter t with "new*"
>> put t
>>
>> put the files into t
>> filter t with "new*"
>>
>> put "left with " & t & CR
>>
>> if there is no stack t then
>> put "cannot find stack"
>> else
>>
>> end if
>>
>> put "Using" && the stacksinuse
>>
>> end startup
>>
> and here's the output
>> new.livecode,234,,,1291247430,1291247604,,527,527,755,
>> left with new.livecode
>> cannot find stack
>> Using
> Help ?
Is that the whole script? It doesn't specifically start using the stack,
so that's why the stacksinuse is empty. The "can't find stack" error
could happen if you saved the stack in the default format. Re-save the
stack in legacy format and try that.
As-is, you'd probably avoid the error if you checked for "is a file"
instead of "is a stack." But since the detailed files already returned
the stack name, that's pretty much a redundant check.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list