Solution for php. ini save_handler modification not taking effect
- 2021-07-09 07:43:57
- OfStack
php-fpm has not been included in php before php5.3. 3, and php is basically configured in php. ini. php5.3. 3 and later can be configured in php-fpm. conf besides php. ini.
If multiple places can be configured, there is one priority. php-fpm. conf has higher priority than php. ini.
1. Modify /etc/php-fpm.conf, or/etc/php-fpm.d/*. conf, or/usr/local/php/etc/php-fpm. 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"
If php-fpm. conf is set to save_handler, the configuration of php. ini will not work.
2. php-fpm becomes a built-in process
[root@localhost workspace]# php-fpm -v
PHP 5.3.3 (fpm-fcgi) (built: Dec 11 2013 03:32:01)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
[root@localhost workspace]# php-cgi -v
PHP 5.3.3 (cgi-fcgi) (built: Dec 11 2013 03:28:11)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies