In PHP, using Memcache as the session's save handler will typically use the following settings:
In php.ini:
Session.save_handler = Memcache
Session.save_path = "Localhost:11211″
In the project configuration:
Ini_set ("Session.save_handler", "memcache"); Ini_set ("Session.save_path", "127.0.0.1:11211″"); On the Internet a lot of information will be written like this: Session.save_path = "Tcp://localhost:11211″ is the connection prefix added tcp://this will cause the PHP memcache module write failure, remember not to add the TCP protocol prefix!
Original: http://php.net/manual/en/memcached.sessions.phpstring
session.save_path
Defines a comma separated of hostname:port entries to use for session server pool, for example "sess1:11211, Sess2:11211″.
If you want the use of ' MemcacheD ' extention not ' memcache ' (there is both diffrent extentions) for session control, you shou LD pay attention to modify php.ini
Most web resource from Google are based on Memcache because It ' s earlier version than MemcacheD. They'll say as following
Session.save_handler = Memcache
Session.save_path = "Tcp://localhost:11211″
But it's not valid if it comes to MemcacheD
You should modify PHP.ini
Session.save_handler = memcached
Session.save_path = "Localhost:11211″
Look, there is no protocol indentifier
PHP memcache Save a Setup error in session