Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-07 16:29:34
Original
1086 people have browsed it

环境: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"
Copy after login

但是发现报错

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"
Copy after login

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

采集者烂JJ

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template