Welcome Guest, Not a member yet? Register   Sign In
Switching to memcache for sessions
#1

Hello,

I need to save sessions to memcache instead of files in my local instance of codeignitor.

This is what I did:
Step 1 : updated config.php
$config['sess_driver'] = 'memcached';
$config['sess_save_path'] = 'localhost:11211';


Step 2: update php.ini
session.save_handler=memcached
session.save_path="tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15" 

Step 3: Restart apache

This works fine.

Now when I need to deploy this to the server, I came to know that I am not allowed to update the ini settings because Im using shared services. 

My question is: how do I set session.save_handler and session.save_path via code in codeignitor and not depend on updating php.ini of the server?
Reply


Messages In This Thread
Switching to memcache for sessions - by priyankaamonker - 04-24-2019, 03:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB