Warning on using PHP7 and Redis as Session Driver |
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. |
Welcome Guest, Not a member yet? Register Sign In |