0

I know this question has been asked and answered. However I cannot make it incorrectly.

I tried with .htaccess

php_value session.gc_maxlifetime 50000
php_value session.cookie_lifetime 50000

I also tried with my config.php site script

@ini_set('session.gc_maxlifetime', 50000);
@session_set_cookie_params(50000);
session_set_cookie_params(50000);

My session still disconnects after more or less 1 hour of inactivity.

I run Debian dedicated server with php 5.6

Regards

    Directive   Local Value Master Value
session.auto_start  Off Off
session.cache_expire    180 180
session.cache_limiter   nocache nocache
session.cookie_domain   no value    no value
session.cookie_httponly Off Off
session.cookie_lifetime 50000   0
session.cookie_path /   /
session.cookie_secure   Off Off
session.entropy_file    /dev/urandom    /dev/urandom
session.entropy_length  32  32
session.gc_divisor  1000    1000
session.gc_maxlifetime  50000   3000
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/php5   /var/lib/php5
session.serialize_handler   php php
session.upload_progress.cleanup On  On
session.upload_progress.enabled On  On
session.upload_progress.freq    1%  1%
session.upload_progress.min_freq    1   1
session.upload_progress.name    PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix  upload_progress_    upload_progress_
session.use_cookies On  On
session.use_only_cookies    On  On
session.use_trans_sid   0   0
Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
yarek
  • 11,278
  • 30
  • 120
  • 219
  • Have you ensured you edit the right `php.ini`? Did you restart your httpd after the change? What `phpinfo()` shows? – Marcin Orlowski Jan 25 '17 at 23:08
  • I added the phpinfo() result – yarek Jan 25 '17 at 23:30
  • Possible duplicate of [Debian based systems Session killed at 30 minutes in special cron, how to override?](http://stackoverflow.com/questions/3865303/debian-based-systems-session-killed-at-30-minutes-in-special-cron-how-to-overri) // With `gc_probability` set to 0, PHP’s session garbage collector is not run at all. Debian uses its own, cron-triggered mechanism - so you need to modify the settings for _that_ accordingly. – CBroe Jan 26 '17 at 10:23
  • so what value should I use in gc_probability ? – yarek Jan 26 '17 at 13:29

0 Answers0