![]() |
Warning on using PHP7 and Redis as Session Driver - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Warning on using PHP7 and Redis as Session Driver (/showthread.php?tid=64993) |
Warning on using PHP7 and Redis as Session Driver - dangyuluo - 04-18-2016 Recently I uploaded my PHP version to PHP7. It was a hard job to upload all packages like Redis, PDO and memcached. After successfully deploying, sometimes the app reports a fatal PHP error like the following(All of the following files are based on Codeigniter 3.0.2) : Code: Message: session_regenerate_id(): Failed to create(read) session ID: user (path: ) I found a bug report about this error in https://bugs.php.net/bug.php?id=71187, in which the last reply gave the reason. PHP 7 and above require the user handler to return a 'string' for success. I don't understand what does that mean but official Redis repo has not fixed it. Anyone who are using Redis as a session driver under PHP7 should notice this issue. RE: Warning on using PHP7 and Redis as Session Driver - Narf - 04-18-2016 Update your CI version as well. |