Reputation: 190
I'm trying to figure out what's wrong for hours,
<?php
ini_set("session.save_handler","memcached");
ini_set("session.save_path","127.0.0.1:11211");
session_start();
print "Session started..\n<br />\n";
?>
Will print but if it's "memcache" notice the "d" it will not work + fire the error in php-fpm
php -i | grep memcach
memcache
memcache support => enabled
memcache.allow_failover => 1 => 1
memcache.chunk_size => 32768 => 32768
memcache.compress_threshold => 20000 => 20000
memcache.default_port => 11211 => 11211
memcache.hash_function => crc32 => crc32
memcache.hash_strategy => consistent => consistent
memcache.lock_timeout => 15 => 15
memcache.max_failover_attempts => 20 => 20
memcache.protocol => ascii => ascii
memcache.redundancy => 1 => 1
memcache.session_redundancy => 2 => 2
Registered save handlers => files user memcache redis
php.ini set as following:
session.save_path = "/var/lib/php/session"
session.save_handler = files
error in php-fpm
PHP Fatal error: session_start(): Failed to initialize storage module: memcache (path: /var/lib/php/session) in /home/webs/pricegoto.com/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 125
Upvotes: 1
Views: 3686
Reputation: 1176
Try some thing like this :
ini_set('session.save_handler', 'memcache');
ini_set('session.save_path',
'tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15');
Upvotes: 2