Home » Php » php – Phpmyadmin doesn't work if session.save_handler set to memcache

php – Phpmyadmin doesn't work if session.save_handler set to memcache

Posted by: admin July 12, 2020 Leave a comment


Phpmyadmin doesn’t work if session.save_handler set to memcache. as soon as I login I get your session has expired, please login again


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

I tried the latest version available from

How to&Answers:

I am having the same problem here… After I enabled memcache session handling in PHP, I can’t connect anymore to phpmyadmin. It’s due to incompatibility between phpmyadmin own session handling mechanism and memcache.

You can disable memcache session handling by putting at the top of your phpmyadmin config.inc.php:

ini_set('session.save_path', '');
ini_set('session.save_handler', 'files');

cf. http://thinkfuturetechs.blogspot.fr/2014/06/phpmyadmin-and-memcache.html


This appears to have been a server misconfiguration issue; from the bug report on the phpMyAdmin issue tracker a reporter wrote that memcached was missing. Check that memcached is properly installed and configured. You can see the bug report at https://github.com/phpmyadmin/phpmyadmin/issues/10464


You might have to change this lines in phpmyadmin folder 'libraries/session.inc.php':

Try include this line at the top of the file:

ini_set('session.save_path', "/tmp/");

Uncomment this line (about 74):

ini_set('session.save_handler', 'files');


With phpMyAdmin 4.7 and memcached it works if you add one line to libraries/common.inc

ini_set('session.save_path', '');

the issue at my installation was having more than one memcached server

Remember: using memcached no tcp:// using memcache use tcp:// in front of your memcached Server IP


Cannot reproduce your problem with the same settings as yours. I have memcached running and the memcache extension installed. Tested with phpMyAdmin 4.0.6 and 4.1-dev.