473,480 Members | 1,777 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Executing Code on session timeout

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
4 3025
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
15441
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
9
2745
by: Hasani \(remove nospam from address\) | last post by:
I have a website with 2 aspx pages Foo.aspx, and bar.aspx The content of both files is //in 1 file Hello <%=Session.ToString()%> ================
8
7287
by: Joe Abou Jaoude | last post by:
hi, I have a web app with forms authentication and a timeout session of 20 mins for security reasons. I recently added a feature that allows users (if they want to) to automatically log in...
5
2069
by: Just D. | last post by:
Do we have any access to the Session object from a different Session? The idea is to save Session of a current user and then if he logs in again then return the Session back. It's not a problem to...
8
5465
by: bdeviled | last post by:
I am deploying to a web environment that uses load balancing and to insure that sessions persist across servers, the environment uses SQL to manage sessions. The machine.config file determines how...
17
5175
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be...
7
2792
by: tshad | last post by:
I thought I understood how the SaveViewState is working and was trying to use this (as per some code I found) to detect refreshes. It seemed to be working but I found that the SaveViewState was...
25
6030
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
9
1809
by: gnewsgroup | last post by:
I am using forms authentication for my web application. In web.config, I have this: <authentication mode="Forms"> <forms loginUrl="Login.aspx" protection="All" timeout="120"...
0
7046
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7088
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6741
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5342
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4783
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4485
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2986
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.