[SOLVED] 8.1.7 Community - Sessions work ?

Are you using LiveCode to create server scripts or CGIs?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
samuel.vannesteBUSGvXT
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 34
Joined: Wed Sep 19, 2012 6:32 pm
Location: Versailles, France

[SOLVED] 8.1.7 Community - Sessions work ?

Post by samuel.vannesteBUSGvXT » Mon Dec 04, 2017 7:49 pm

Hello,
I have installed the community version 8.1.7 on a new server and my already running scripts didn't work correctly (previously used with a commercial 5.x version).

It took me some time to understand what caused the problem : the sessions won't work correctly. Even the simplest code would generate two sessions for one connection

Code: Select all

<?lc
set the sessionsavepath to gMySessionsFolder
set the sessionCookieName to gMySessionsCN
start session
put "test" into $_SESSION["myVar"]
put quote & $_SESSION["myVar"] & quote & "saved to session"
stop session

put empty
?>

<?lc
start session
put quote & $_SESSION["myVar"] & quote & "read from session"
stop session
?>
Before to fill any bug report, please is there something I could have missed about the server's requirements or not understood with the engine's evolution, maybe ?

Many thanks

samuel.vannesteBUSGvXT
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 34
Joined: Wed Sep 19, 2012 6:32 pm
Location: Versailles, France

Re: [SOLVED] 8.1.7 Community - Sessions work ?

Post by samuel.vannesteBUSGvXT » Wed Dec 13, 2017 11:12 am

Replying to myself : not a problem with LC server itself but with my antivirus which calls the URL before letting the browser access it.

samuel.vannesteBUSGvXT
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 34
Joined: Wed Sep 19, 2012 6:32 pm
Location: Versailles, France

Re: [SOLVED] 8.1.7 Community - Sessions work ?

Post by samuel.vannesteBUSGvXT » Thu Dec 14, 2017 2:35 pm

Found today a workaround: by setting the sessionid just before starting the session in any place, the session is no more doubled. This implies only to send that sessionid once to the client and checking if the session file exists or send a new sessionid if not. Perfect for me.

Post Reply

Return to “CGIs and the Server”