Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed the memcache extension and also memcached. Now what do I need to chance in the php.ini file so that all sessions are handled in memcache?

share|improve this question
Obviously I mean "change", not chance. No idea of how I managed to make that type twice. – Peter Johansson Nov 15 '10 at 14:40
I edited the title for you :) – Tom O'Connor Nov 15 '10 at 14:41
up vote 1 down vote accepted

Simple answer:

session.save_handler = memcache



Long answer, read these pages, and it should explain it a bit better.

share|improve this answer
about the server:port, any insight of what I should put there? – Peter Johansson Nov 15 '10 at 14:42
Should it be "tcp://"?? – Peter Johansson Nov 15 '10 at 14:49
Google gave me results such as these: session.save_path="udp://<memcache_server>:11211?persistent=1&weight=1&timeout=1‌​&retry_interval=15".... do you have an insight of how exactly this works...? – Peter Johansson Nov 15 '10 at 14:51
Yep. Or you can use IP Address instead, like "tcp://" would refer to the memcached server on localhost. – Tom O'Connor Nov 15 '10 at 14:52
Excellent. I will go with "tcp://". Do you have an insight in these type of params: "?persistent=1&weight=1&timeout=1&retry_interval=15"? – Peter Johansson Nov 15 '10 at 14:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.