The session that resolves PHP cannot be saved to Redis

Source: Internet
Author: User

解决 php的session无法保存到redis

The session of PHP is written to the Redis configuration
Vim/etc/php-fpm.d/www.conf
user = Nginx
Group = Nginx
Php_value[session.save_handler] = Redis
Php_value[session.save_path] = ' tcp://192.168.1.2:6688 '
Php_value[soap.wsdl_cache_dir] =/var/lib/php/wsdlcache

Vim/etc/php.ini
Session.save_handler = Redis
Session.save_path = "tcp://192.168.1.2:6688"

But when I refresh the verification code, I look at the Redis key value is, found to be empty, did not write inside
Connect to Redis to see the session key value
Redis-cli-h 192.168.1.2-p 6688
192.168.1.2:6688> Keys * #查看所有key值
(empty list or set)
192.168.1.2:6688> quit #退出
Rpm-qa |grep PHP, found the installation of the Redis Extension Pack for PHP installed is php70-php-pecl-redis-3.1.6-1.el6.remi.x86_64

And the version I installed was php70w.
Workaround:
Yum Search php70w
Yum Install Php70w-pecl-redis.x86_64-y

The session that resolves PHP cannot be saved to Redis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.