473,799 Members | 3,422 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session Data Loss because of session.cache_e xpire?

Hi, we have a php-based application that is hosted by Yahoo!
Webhosting. Ever since the application was created, it has been
plagued by periodic session data loss. Here's a typical example:

We will successfully input 7 clients into the system, but upon
submitting the 8th, all session data fails to enter the MySQL database.
After viewing the record in the database, the row is empty except for
data that was not stored in a session.

I have been studying the phpinfo() page and came across the
session.cache_e xpire variable. Here is what I found out about this
variable:

session.cache_e xpire specifies time-to-live for cached session pages in
minutes, this has no effect for nocache limiter. Defaults to 180.

Forgive my ignorance, but does this mean that after 180 minutes, a
session will expire and be destroyed? If so, is there any way to keep
the session alive, atleast until after the process has been completed
(ex: the client has been added to the system)?

Also, our application utilizes session data extensively- is there
anything that we can do to foster session health (like perform a
session_destroy () after every process to reset things?)

Here is the server info:

PHP 4.3.11
MySQL 3.23.49
FreeBSD 4.8

Thanks,

-Karl

Oct 13 '05 #1
1 2865
db_guy wrote:
<snip>
I have been studying the phpinfo() page and came across the
session.cache_e xpire variable. Here is what I found out about this
variable:

session.cache_e xpire specifies time-to-live for cached session pages in
minutes, this has no effect for nocache limiter. Defaults to 180.

Forgive my ignorance, but does this mean that after 180 minutes, a
session will expire and be destroyed?


You're confusing cache_expire with gc_maxlifetime
<http://in.php.net/session#ini.ses sion.gc-maxlifetime>

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Oct 14 '05 #2

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

Similar topics

1
5869
by: Paul | last post by:
As session info is being passed to the URL, I want it to expire pretty quickly after n minutes of non activity on the user's part. I'm looking at session.cache_expire and think that this is what I need. Can anyone tell me if this is in fact what this function does and how/why it relates to session.cache_limiter = nocache? I'm not asking blindly, I have looked it up in the PHP documentation but while it explains how to temporarily override...
6
6575
by: Ruben van Engelenburg | last post by:
Hi all, I have a strange problem. I have a login procedure that uses a mysql database in which the users are stored. The login procedure is pretty straightforward. In every page I unclude my session.php. session.php: =============
1
21269
by: Ralph Freshour | last post by:
Can I adjust the PHP session timeout on my web site? Users are reporting timeout errors when they leave their computer for a period of time and then come back to resume using the site - is there some kind of global session timeout in PHP that I can set? Thanks...
2
3310
by: Damien | last post by:
Hi to all, I'm currently re-designing our intranet : nice and lean CSS2, cleaned-up PHP 4.3.7, better-normalized MySQL ;o). So I've started using the $_SESSION variable instead of register_globals and a couple "better pratice" code. Not perfect, but better. Problem : I'm testing everything with Firefox on my machine (IIS on WinXP Pro), and everything is ok. As soon as I try MS IE 6, it doesn't seem to keep the sessions from page to...
0
3240
by: joseph conrad | last post by:
Hi, I tried to implement my own session handler in order to keep control on the process the drawback I foun it is not creating and storing in my cookie the PHPSESSID variable anymore. reading te documentation it seems it should do it anyway any advice?
1
3613
by: ljayz | last post by:
i want my script to automatically expire session in a given period of time e.g 5mins (as a test). my problem is when ive set session_cache_expire(5); in my script, run it and wait for about 6-10mins then click a link that has the particular session it still dont expire. i have also tried ini_set(session.cache_expire, '5'); but still got no expired session. in php.ini session.cache_expire is set to 30. i have no access to php.ini. any idea guys...
1
3098
by: Rogier | last post by:
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
3
3118
by: mikeboston | last post by:
Hi, I am attempting to use php session variables on a server which is running Red Hat Linux, but the variables don't seem to be getting passed between pages. I have tried the same exact test script on my third party webhost, and it works just fine. Does anyone know of anything that needs to be changed in a default Red Hat php setup? This is the test script that I am using: http://php.about.com/od/advancedphp/ss/php_sessions.htm This is...
1
8988
by: KidQuin | last post by:
I am having problems with session value between pages. Happening in both firefox and IE7. I go between page by links so I know it's not header changes. I use session_start as the first line on the page creating the session and the new page. The problem just start when code was untouched. I am using PHP 4.4.7 on an Apache Server. Any help or suggestions would be welcomed here is my php.ini file ; Handler used to store/retrieve...
0
9688
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10490
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10238
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9077
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7570
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4145
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.