Reputation: 914
We currently use $_SESSION for our current session data (ie, login, current state, etc, etc). And the script worked perfectly fine for ages, but we changed from an old PHP4 server to a PHP5 server. Now after a certain amount of time (roughly 10 mins, but it doesn't seem to be consistent) the $_SESSION gets wiped! (:O!). But it appears as if the PHPSESSID is still residing in the cookies, so the cookie doesn't seem to expire...
My servers current settings are: (phpinfo)
What could be causing this? I'm sure its something small I've totally over looked and is the primary cause.
My session variables:
Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 15400 15400
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly Off Off
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file /dev/urandom /dev/urandom
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 154000 154000
session.gc_probability 0 0
session.hash_bits_per_character 5 5
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /var/lib/php /var/lib/php
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies On On
session.use_trans_sid 0 0
I am using the following "non-standard extensions":
-X-Debug
-Suhosin
-eAccelerator
Upvotes: 1
Views: 181
Reputation: 6764
My bet is that other applications are wiping out your session. They seem to share the same session save_path.
Thy changing your save_path using session_save_path().
Upvotes: 1
Reputation: 6579
Are you on a shared hosting? If yes, try to change session.save_path: Could session_start() in php be messing up my users sessions lengths?
Upvotes: 0