Difference between revisions of "PHP sessions"
Jump to navigation
Jump to search
↑ https://www.php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime
Tags: Mobile web edit, Mobile edit |
|||
(24 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | == Debian/Ubuntu configuration == | |
+ | <code>[[php -i (grep session)| php -i | grep session]]</code> | ||
+ | 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]]) | ||
+ | == Debian/Ubuntu session cleaning == | ||
+ | * <code>[[sessionclean]]</code> Debian/Ubuntu sh script | ||
+ | * <code>[[phpsessionclean.service]] [[systemd]]</code> service | ||
+ | * <code>[[phpsessionclean.timer]]</code> | ||
+ | |||
+ | |||
+ | == Session path == | ||
[[php -i]] | grep session.save_path | [[php -i]] | grep session.save_path | ||
− | session.save_path => /var/lib/php/sessions => [[/var/lib/php/]] | + | session.save_path => /var/lib/php/sessions => [[/var/lib/php/sessions]] |
grep "session.save_path" /etc/php/7.2/apache2/[[php.ini]] | grep "session.save_path" /etc/php/7.2/apache2/[[php.ini]] | ||
Line 12: | Line 22: | ||
− | php sessions | + | [[php]] sessions |
Could not open input file: sessions | Could not open input file: sessions | ||
== Related terms == | == Related terms == | ||
− | |||
− | |||
* [[Session garbage collector (SGC)]] | * [[Session garbage collector (SGC)]] | ||
+ | * [[Redis]] | ||
+ | * https://docs.python-requests.org/en/master/ | ||
+ | * Users lose their php/http sessions | ||
+ | * <code>[[session_start]]</code> | ||
+ | * [[pm.]] | ||
== Activities == | == Activities == | ||
Line 24: | Line 37: | ||
== See also == | == See also == | ||
+ | * {{PHP sessions}} | ||
* {{PHP}} | * {{PHP}} | ||
− | |||
[[Category:PHP]] | [[Category:PHP]] |
Latest revision as of 10:00, 2 October 2024
Contents
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]
sessionclean
Debian/Ubuntu sh scriptphpsessionclean.service systemd
servicephpsessionclean.timer
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]
- Session garbage collector (SGC)
- Redis
- https://docs.python-requests.org/en/master/
- Users lose their php/http sessions
session_start
- pm.
Activities[edit]
See also[edit]
- PHP sessions,
session_start
,php -i | grep session
,/var/lib/php/sessions/
, sessionclean,phpsessionclean.service (systemd service)
- PHP,
php-fpm, www.conf
,php -i
, PHP sessions, symfony,fastcgi_pass
,sessionclean (shell script)
,phpsessionclean.service (systemd service),phpquery
,php.ini
,/var/log/php*
, PECL,php --help
, PHPUnit, Laravel, PHP framework, Composer,phpbrew, Xdebug, php --version
, PHP Fatal error, Hello, World! (php)]
Advertising: