1

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?

  • 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
1

Simple answer:

session.save_handler = memcache

and

session.save_path="tcp://server:port"

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

  • about the server:port, any insight of what I should put there? – Peter Johansson Nov 15 '10 at 14:42
  • Should it be "tcp://my.server.com:11211"?? – 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://127.0.0.1:11211" would refer to the memcached server on localhost. – Tom O'Connor Nov 15 '10 at 14:52
  • Excellent. I will go with "tcp://127.0.0.1:11211". 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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