Home >Database >Mysql Tutorial >php使用memcache存储session时报错解决方案

php使用memcache存储session时报错解决方案

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 16:29:341121browse

环境:centos+apache+php+memcache 使用的是php的memcached扩展(注意不是memchache扩展)。 php使用memcache存储session时报错解决方案 按照网上的资料配置php.ini http://leo108.com session.save_handler=memcachedsession.save_path="tcp://127.0.0.1:11

环境:centos+apache+php+memcache

使用的是php的memcached扩展(注意不是memchache扩展)。 php使用memcache存储session时报错解决方案

按照网上的资料配置php.ini

http://leo108.com

session.save_handler=memcached
session.save_path="tcp://127.0.0.1:11211"

但是发现报错

http://leo108.com

Warning: Unknown: Failed to write session data (memcached). Please verify that the current setting of session.save_path is correct (tcp://127.0.0.1:11211) in Unknown on line 0

memcache

解决方案是把tcp://去掉 http://leo108.com

session.save_handler=memcached
session.save_path="127.0.0.1:11211"

tcp://开头的是memcache扩展的写法,memchached扩展不需要。

采集者烂JJ

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
Previous article:Hadoop层级队列组织方式Next article:MongoDB 2.4 Released