Difference between revisions of "PHP sessions"

From wikieduonline
Jump to navigation Jump to search
Line 3: Line 3:
 
  session.gc_maxlifetime => 1440 => 1440 <ref>https://www.php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime</ref>
 
  session.gc_maxlifetime => 1440 => 1440 <ref>https://www.php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime</ref>
 
  [[session.gc_probability]] => 0 => 0 (Disables [[GC]])
 
  [[session.gc_probability]] => 0 => 0 (Disables [[GC]])
 +
 +
== Debian/Ubuntu ==
 +
* <code>[[sessionclean]]</code> Debian/Ubuntu sh script
 +
* <code>[[phpsessionclean.service]] [[systemd]]</code> service
 +
* <code>[[phpsessionclean.timer]]</code>
 +
  
 
  [[php -i]] | grep session.save_path
 
  [[php -i]] | grep session.save_path

Revision as of 15:05, 11 September 2021

session.gc_maxlifetime => 1440 => 1440 [1]
session.gc_probability => 0 => 0 (Disables GC)

Debian/Ubuntu


php -i | grep session.save_path
session.save_path => /var/lib/php/sessions => /var/lib/php/sessions
grep "session.save_path" /etc/php/7.2/apache2/php.ini
;     session.save_path = "N;/path"
;     session.save_path = "N;MODE;/path"
;session.save_path = "/var/lib/php/sessions"
;       (see session.save_path above), then garbage collection does *not*

Ref: https://stackoverflow.com/a/30127516


php sessions
Could not open input file: sessions

Related terms

Activities

See also

  • https://www.php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime
  • Advertising: