View Full Version : PHP/Apache Session
02-01-2007, 05:40 PM
I am having a problem with apache 2.2 and php 5, while the script is in use it will automatically logout a user while they are using it. This as only happened since i changed the server from apache 2 to apache 2.2. Is there any problems that i should be aware of. I have looked in the session variable section in the PHP.ini file but all the setting are the same as they were before. The variables are set so that the session shouldn't timeout until the browser is closed and this isn't the case.
02-01-2007, 07:09 PM
If i recall correctly apache needs to be restarted for the settings to take effect.
02-01-2007, 07:13 PM
You need to define what you mean by - "automatically logout a user while they are using it."
What condition in your code is being tested to determine if someone is logged in? A session variable? Just the existence of a session ID?... What have you done to debug this in your code, such as echoing the value of variables/session data? Any error messages? Any errors in the server log file?
Also, describe the conditions that this occurs under. Are they browsing between pages? Do they refresh a page? Is it time based (they are just on one page, perhaps entering something in a form?)
Is this on a busy site with a lot of session_start() statements? If so, the garbage_collection settings will also cause "old" session data files to be deleted, which will cause the "automatic logout" symptom that you have given.
02-01-2007, 07:27 PM
they are using session variables that store their usernames, these are set when the user logs in. What they are doing is calling people and after about 20 calls the users get a blank page, upon refreshing this they are taken back to the login page.
the user is passing between several pages when this happens upon entering a call result they have to set job notes, callback date and time (if one) and after that it navigates to the next call page.
I have looked into the garbage collection and set this so that it is disabled and it had no effect.
I hope this is now a bit clearer, i am really confused about this????
02-01-2007, 07:29 PM
i have checked all the session variables and none of them are changing.
more S**t hits the fan oooopps.
02-01-2007, 07:53 PM
There are only two ways to disable garbage_collection - use the "subdirectory option" for the save_path and install your own custom session handler that has no "gc" function.
Have you done either of these and confirmed that they are actually in effect?
Perhaps if you post the actual session settings that are output from a phpinfo(); statement?
02-02-2007, 11:29 AM
i have sorted this problem now doing the easiest thing possible, re-installing the old version of apache that i was using before the upgrade. Thanks for your help anyway.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.