Difference between revisions of "PHP sessions"

From wikieduonline
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
  
  
 +
== Session path ==
 
  [[php -i]] | grep session.save_path
 
  [[php -i]] | grep session.save_path
 
  session.save_path => /var/lib/php/sessions => [[/var/lib/php/sessions]]
 
  session.save_path => /var/lib/php/sessions => [[/var/lib/php/sessions]]
Line 30: Line 31:
 
* Users lose their php/http sessions
 
* Users lose their php/http sessions
 
* <code>[[session_start]]</code>
 
* <code>[[session_start]]</code>
 +
* [[pm.]]
  
 
== Activities ==
 
== Activities ==
Line 37: Line 39:
 
* {{PHP sessions}}
 
* {{PHP sessions}}
 
* {{PHP}}
 
* {{PHP}}
 
  
 
[[Category:PHP]]
 
[[Category:PHP]]

Latest revision as of 10:00, 2 October 2024

Debian/Ubuntu configuration[edit]

 php -i | grep session
session.gc_maxlifetime => 1440 => 1440 [1]
session.gc_probability => 0 => 0 (Disables GC)

Debian/Ubuntu session cleaning[edit]


Session path[edit]

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[edit]

Activities[edit]

See also[edit]

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