start session

Typecommand
DictionaryLCS
LibraryLiveCode Script
Syntax
start session
Summary

Begins a server session.

Introduced5.0
OSmac, windows, linux
Platformsserver
Example
start session
start session
put "jack" into $_SESSION['user']
set the sessionLifeTime to 360 -- 6 minutes
start session
RelatedKeyword: $_SESSION
Property: sessionSavePath, sessionLifetime, sessionName, sessionId
Command: stop session, delete session
Glossary: property
Description

Use the start session command to begin a server session. The contents of the $_SESSION array is restored if available.

If no session identifier is specified by the sessionId property or contained within the session cookie, then a new session will be created with a unique identifier, and the contents of the session cookie set to that identifier.

The location where the $_SESSION array is stored on the server is configured using the sessionSavePath property.

A session is stored until it expires or is deleted using the delete session command. The maximum age of a session is configured using the sessionLifetime property.

Note: You do not need to alter any of the session properties in order to start and use sessions. They provide a way for advanced users to configure the way session work.

Warning: Session properties cannot be changed once a session has been created.