|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-07-20 18:33 UTC] johannes@php.net
-Status: Open
+Status: Feedback
[2013-07-20 18:33 UTC] johannes@php.net
[2013-10-15 11:54 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 01:00:01 2025 UTC |
Description: ------------ I'am running a PHP5 5.4.4-14+deb7u3 with an apache2 2.2.22-13 and it suffered of an issue with sessions, these ones are quickly deleted without taking into account the php.ini configuration. I recently updated my server from Squeeze to Wheezy and i come with a new version of PHP, the version 5.4 and these bugs. I got the new php.ini configuration that i updated for my own preferences. Here is my php.ini session related configuration: [Session] session.save_handler = files ;session.save_path = "/var/lib/php5" session.use_cookies = 1 ;session.cookie_secure = session.use_only_cookies = 1 session.name = PHPSESSID session.auto_start = 0 session.cookie_lifetime = 604800 session.cookie_path = / session.cookie_domain = session.cookie_httponly = session.serialize_handler = php session.gc_probability = 0 session.gc_divisor = 1000 session.gc_maxlifetime = 604800 session.bug_compat_42 = Off session.bug_compat_warn = Off session.referer_check = ;session.entropy_length = 32 ;session.entropy_file = /dev/urandom session.cache_limiter = nocache session.cache_expire = 180 You see that PHP should not delete sessions due to the session.gc_probability=0 and even if it does, the session.gc_maxlifetime is for one week. I checked the cookie, it is always right but the session file seems to disappear after the default session.cookie_lifetime delay. It is a debian stable server, so I can't upgrade PHP more than the current stable release for debian. :-D For my own usage, I will try to use a custom Session Handler. Test script: --------------- <?php session_start(); if( !isset($_SESSION['last_time']) ) { echo 'Creating session.'; } else { echo 'Delay since last update: '.($_SESSION['last_time']-time()).' seconds.'; } $_SESSION['last_time'] = time(); // This is just a test script for bugs.php.net Expected result: ---------------- Under one week reload, I expect displaying 'Delay since last update', not 'Creating session.'. Actual result: -------------- Displaying 'Creating session.' after less than 30 minutes.