Using redis to store sessions |
Hi
Using php7 FPM, CodeIgniter 3.1.2, Redis 3.0.3. After struggling for few hours finding the best setup for using Redis as store engine for sessions I find myself even more confused. I have tried the following setups, and I will be glad if you have some insights of how this should be working. Setup 1: codeignier config PHP Code: $config['sess_driver'] = 'redis'; php.ini as left with default configuration. used session_write_close() immediately after updating session data. Result: Codeigniter is using Redis for storing sessions but then I came across this error on heavy ajax pages: Session: Session: Error while trying to free lock for ci_session:cq399b646bc6lstdhrcrb69k7nvu42r8:lock I understand the logic and need of lock mechanism but anyway, it seems like CodeIgniter is not handling multiple ajax requests simultaneously. Setup 2: codeignier config PHP Code: $config['sess_driver'] = 'files'; php.ini Code: session.save_handler = redis Result: nothing works! I get the following error: Message: is_dir(): Unable to find the wrapper "tcp" - did you forget to enable it when you configured PHP? Filename: drivers/Session_files_driver.php Line Number: 134 Do you guys have any idea of what should be the best way to use redis for storing sessions? |
Messages In This Thread |
Using redis to store sessions - by eranhazout - 11-01-2016, 01:17 PM
RE: Using redis to store sessions - by Narf - 11-01-2016, 01:40 PM
RE: Using redis to store sessions - by eranhazout - 11-01-2016, 01:50 PM
RE: Using redis to store sessions - by Narf - 11-01-2016, 03:52 PM
RE: Using redis to store sessions - by eranhazout - 11-02-2016, 05:55 AM
|