Php uses memcache to store sessions and reports an error Solution

Source: Internet
Author: User
Environment: centos + apache + php + memcache uses the memcached extension of php (note that it is not the memchache extension ). When php uses memcache to store sessions, an error is reported. Solution: Configure php. inileo108.comsession. save_handlermemcachedsession.save_pathtcp: 127.0.0.1: 11 according to the information on the Internet.

Environment: centos + apache + php + memcache uses the memcached extension of php (note that it is not the memchache extension ). Php use memcache to store session report error solution according to the information on the Internet configure php. ini http://leo108.com session. save_handler = memcachedsession. save_path = "tcp: // 127.0.0.1: 11

Environment: centos + apache + php + memcache

The memcached extension of php is used (note that it is not the memchache extension ). Php uses memcache to store sessions and reports an error Solution

Configure php. ini according to the information on the Internet

Http://leo108.com

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

However, an error is reported.

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

The solution is to remove tcp: // http://leo108.com

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

Tcp: // starts with the memcache extension, which is not required by the memchached extension.

Zombie JJ

Original article address: php uses memcache to store sessions and reports an error solution. Thank you for sharing it with me.

Related Article

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.