Home >php教程 >php手册 >php.ini save_handler 修改不生效的解决办法

php.ini save_handler 修改不生效的解决办法

WBOY
WBOYOriginal
2016-06-06 20:19:511197browse

这篇文章主要介绍了php.ini save_handler 修改不生效的解决办法,需要的朋友可以参考下

php5.3.3以前php-fpm还没有被php收录,配置php基本都在php.ini里面,php5.3.3及以后,除了在php.ini配置以外,还可以在php-fpm.conf里面配置。
多个地方都可以配置的话,就存在一个优先级。php-fpm.conf优先级比php.ini高。
1,修改/etc/php-fpm.conf,或者,/etc/php-fpm.d/*.conf,或者,/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"

如果php-fpm.conf设置了save_handler,那么php.ini的配置就不会起作用。

2,,php-fpm成为内置进程

[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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn