Time-outs in LC Server?
alex at tweedly.net
Thu Jul 18 18:55:52 EDT 2019
You should never use 'send in time' or 'wait with messages' in LCServer.
Each http request starts up your LC server script anew - and you need
that request to be handled and the server-instance shut down as quickly
as possible. And the next http request will start up another, entirely
separate, instance; so you need to be storing some status info between
If a user doesn't do anything on the site for a few minutes, then you
can use a flow something (vaguely) like :
(at start of the script):
- check if user is logged in (if not, prompt them to login / register
- check a database entry for when they were last active (up to you
whether that's per-user, per user/per-IP address, or per-some-cookie, or
- if time-since-last-action is too long - log them out, and as
a. apologise :-), and go to login screen
b. return a "not logged in" error
- if it is still within time, then update the "last active" database entry
- then do the rest of the current request
On 18/07/2019 17:45, Rick Harrison via use-livecode wrote:
> I was playing around with Send In Time
> with LC Server. It’s throwing an error
> at me after it’s supposed to be all done
> The reason I was playing with such things
> is I want to be able to logoff any user that
> hasn’t been using the website for a few
> minutes when the system times out.
> How are you handling such things in
> LC Server?
> might work, but I’d rather use LC
> for the task if possible.
> Thanks in advance!
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode