I have been using memcached and I upgraded from PHP 5.4 to 5.6 and now it is failing to connect and store.
I have:
ini_set('session.save_handler', 'memcached');
ini_set('session.save_path', 'serverAddress:11211');
session_start();
I have also tried tcp:// before the server address, but no luck there.
In the error log, I am getting the following errors:
- PHP Warning: session_start(): Write of lock failed
- PHP Warning: session_start(): Unable to clear session lock record
- PHP Warning: Unknown: Failed to write session data (memcached). Please verify that the current setting of session.save_path is correct
I guess something changed in the versions of PHP. Any help is appreciated, thanks!
Note: I am using Amazon Elastic Beanstalk for the web server and ElastiCache for the memcached
What I Have Tried
Used a config file with:
files: "/etc/php.d/setup.ini": mode: "000644" owner: root group: root source: https://s3.amazonaws.com/path/to/file.ini
Inside of the ini file is:
[php]
session.save_handler = memcached
session.save_path = 'memcached.server.path.cache.amazonaws.com:11211'
- I have tried using
session_write_close()
- I have tried using tcp:// before the server path
- I have also tried using memcache instead of memcached as the handler.