linux php 中session默认file
假如修改为redis
php.ini
session.save_handler = "files";
session.save_path="tcp://127.0.0.1:6379"
/etc/php-fpm.d/*.conf 这个地方也要改
; Set session path to a directory owned by process user
;php_value[session.save_handler] = files
;php_value[session.save_path] = /var/lib/php/session
php_value[session.save_handler] = redis
php_value[session.save_path] = "tcp://127.0.0.1:6379"
时间: 2024-11-05 21:38:08