Sessions on LC Server

Alex Tweedly alex at tweedly.net
Tue Aug 27 08:24:39 EDT 2013


Yes please; my example fails even if "start session is the first 
statement in my .lc file :-)
you could email it direct to me at alex at tweedly.net ...

Are you using on-rev ? which machine ? which engine version ?

Thanks
-- Alex.

On 27/08/2013 13:16, Ethan Lish wrote:
> Alex
>
> I also struggled with this and found I had to move session control earlier in the stack. I have a dirty code sample if you want to take a look
>
> E
>
> Ethan at Lish.net
> 240.449.8270
>
> Sent from MyPhone
>
>> On Aug 27, 2013, at 8:08 AM, Alex Tweedly <alex at tweedly.net> wrote:
>>
>> I'm trying to get sessions working on LC Server with no luck.
>>
>> I'm using code from http://lists.runrev.com/pipermail/use-livecode/2012-January/166885.html
>> which was where Malte got this to work OK - so it ought to be working code.
>> (I added the line to print out the version - but it failed without that too. Also fails without setting sessionid)
>>
>> I'm on pancake.on-rev.com, using version 5.0.2 of LC server, and I get
>>
>> 5.0.2
>>
>> file "/home/.../play.lc"
>>   row 4, col 1:
>>
>> from my file play.lc
>>
>> <?lc
>> put version()
>> set the sessionid to "100"
>> start session
>> if $_SESSION["counter"] is empty then
>>   add 1 to $_SESSION["counter"]
>>   put "No previous session detected. Session counter=" & $_SESSION["counter"]
>> else
>>   add 1 to $_SESSION["counter"]
>>   put "Session counter:" & $_SESSION["counter"]
>> end if
>> stop session
>> ?>
>>
>> Any ideas ?
>>
>> Thanks
>> -- Alex.
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list