Partner and Community Forums
Valid session.save_path for Memcached
Last post Mar 06, 2015 05:03 PM by DropPhone
Feb 12, 2015 06:47 AM|DiamondEagle|LINK
I'm running the Moodle LMS on a F5 load-balanced Windows Server 2008 R2, IIS 7.5 and PHP NTS environment (two Windows VM's). Using the Moodle database for user session management has become a bit of a problem (I'm experiencing some session lock problems
during busy times) so I'm investigating the recommended way to handle session management for large Moodle sites: Memcached.
I've installed the Memcached service on the Moodle test server and it seems to be running ok. However, when I run the PHP Manager in IIS it gives me a "Not optimal PHP configuration detected" message. The "problem" PHP setting is 'session.save_path'.
My php.ini has the following session.save_path value:
session.save_path = "tcp://myserver.com:11211?persistent=1&weight=2&timeout=2&retry_interval=10"
but the Configuration Recommendations screen in the PHP Manager tells me that "the PHP directive 'session.save_path' uses a non-existent directory." That's probably because "tcp://myserver.com:11211..." is not a an absolute path to a folder somewhere on
the Windows file system.
The PHP Manager recommends that I use 'C:\Windows\Temp', but doing that will break the Memcached setup.
So, how do I get the PHP Manager to recognise Memcached as a valid session caching manager?
The "You-Shouldn't-Be-Running-PHP-On-Windows-And-IIS" crowd is starting to give me the "I told you so..." look and I'd really like to prove them wrong!
Mar 06, 2015 05:03 PM|DropPhone|LINK
[I'm not an expert on memcached, nor have I ever set it up]
Looking at the documentation, it looks like you have to update your php.ini to set the session.save_handler = memcached, and then set the session.save_path = <comma delimited list of host & port>
So, in your case:
session.save_handler = memcached
session.save_path = myserver.com:11211
Hope this helps!