By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,216 Members | 1,032 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,216 IT Pros & Developers. It's quick & easy.

Executing Code on session timeout

P: n/a
Hi all,
is it possible to execute some code on the session timeout event?
i.e. clear all db information and other stuff when the php session is
destroyed through the gc_maxlifetime timeout.

Thanks in advance.
Mar 3 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Rik
On Fri, 02 Mar 2007 20:12:32 +0100, Team 4 Profit <te*********@gmail.com>
wrote:
Hi all,
is it possible to execute some code on the session timeout event?
i.e. clear all db information and other stuff when the php session is
destroyed through the gc_maxlifetime timeout.
Create your own session_handler:
http://www.php.het/session_set_save_handler

--
Rik Wasmus
Mar 3 '07 #2

P: n/a
Create your own session_handler:
http://www.php.het/session_set_save_handler
Thank you very much.
It is exactly wath I need.

There is also something like the ASP Application object in PHP?

Thanks
Mar 5 '07 #3

P: n/a
Rik
andrea <no****@nospam.comwrote:
>Create your own session_handler:
http://www.php.het/session_set_save_handler

Thank you very much.
It is exactly wath I need.

There is also something like the ASP Application object in PHP?
Not a built in one to my knowledge, never really needed one. I usually
parse some ini-files to constants from outside the root.
--
Rik Wasmus
Posted on Usenet: any site claiming this as original content or me as an
contributing member is wrong.
Ask Smart Questions: http://tinyurl.com/anel
Mar 5 '07 #4

P: n/a
There is also something like the ASP Application object in PHP?

Not until you write one. Most application or session-related
functionality is done with functions or superglobals. I usually write an
application class that features methods for retrieving page parameters
(with built-in register-globals-correction and the possibility to return
other types than strings), access to the backend object, and
application-wide stuff, like user feedback messages and application
settings.

Best regards
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/
Mar 6 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.