473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Session time out too fast

Hello,

I made a simple script with some session variables. When I work in the
application, and when I don't use the application for some time, the
session vars are erased... even when I set the session time out for 4
hours....

Here is a part of the code:

<?PHP
session_cache_expire(240);
$cache_expire = session_cache_expire();
session_start();
include('functions.php');
$naam_l = '';

if (isset($_SESSION['a_name'])) $naam_l = $_SESSION['a_name'];

How is it possible that the vars don't work anymore , for example
within 30 min?
Is there maybe a problem in IE6? How can I debug this problem....

Greetings and thanks,

Ronald,
Vlaardingen - The Netherlands

Jul 23 '07 #1
1 3079
Rik
On Mon, 23 Jul 2007 20:47:31 +0200, Rogier <r.************@gmail.com
wrote:
Hello,

I made a simple script with some session variables. When I work in the
application, and when I don't use the application for some time, the
session vars are erased... even when I set the session time out for 4
hours....

Here is a part of the code:

<?PHP
session_cache_expire(240);
$cache_expire = session_cache_expire();
session_start();
include('functions.php');
$naam_l = '';
RTFM:
session.cache_expire integer
session.cache_expire specifies time-to-live for cached session pages in
minutes

session.gc_maxlifetime integer
session.gc_maxlifetime specifies the number of seconds after which data
will be seen as 'garbage' and cleaned up. Garbage collection occurs during
session start

The 'cache expire' is for:"cache control method to use for session pages
(none/nocache/private/private_no_expire/public)", NOT for timing out
sessions.

So, set session.gc_maxlifetime to an appropriate value.
--
Rik Wasmus
Jul 23 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
11
by: HolaGoogle | last post by:
hi all, can you please tell me what i should do to avoid session timeout when displaying my database info in my asp form (DisplayUserDatabase.asp)??? ** actualy it does load and display the...
5
by: Mark Rodrigues | last post by:
Hi Everyone, I have been fighting a problem for a while and I wonder if someone out there can help. This problem has been presented in a number of news postings previously but I am yet to see a...
1
by: lsf_80 | last post by:
I am using Session to capture my login name and this session is checking on every page that required login. However, there is a problem that the session is expired too fast! When i jump to another...
6
by: Gonenc Ercan | last post by:
Hi, I ve ended up debugging a ASP.NET project (with about 380 files on the project .NET Framework 1.0 on IIS 5.0) which has a memory leak... The memory rises too fast. With about 25-30 active...
0
by: George | last post by:
Hi, I am working on a web site and have a problem with how Session is handled by ASP.NET. Let's say you have a successful web site and one day google (or yahoo) finds out about it. So it...
14
by: Sergei Shelukhin | last post by:
Hi. I have a session started in php and two browser windows (IE)/tabs (FF) open. In one window, I execute a very slow report, immediately after that, I execute a fast simple page in another. I...
6
by: ChrisAtWokingham | last post by:
I have been struggling with unexpected error messages on an ASP.NET system, using SQL and C#. The application draws organisation charts, based on data stored in the SQL database. Some of the chart...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.