Linux – memcached session handler in php.ini

linuxmemcachedPHPUbuntu

I have installed memcached and the below code in php.ini works:

session.save_handler = memcache 
session.save_path = "tcp://localhost:11211" 

but when i try to use the memcached handler.. this is not storing the sessions..

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

Best Answer

memcache and memcached are two different PHP extensions. memcache needs the protocol identifier (tcp://), whereas memcached doesn't.

If memcached doesn't work, you maybe haven't installed the required PHP module.