We trying use Redis for session backend. When in config.local.php I set $config['session_backend'] = 'redis'; then I have error: Class 'Redis' not found at store\app\Tygh\Backend\Session\Redis.php, line: 200
We trying use Redis for session backend. When in config.local.php I set $config['session_backend'] = 'redis'; then I have error: Class 'Redis' not found at store\app\Tygh\Backend\Session\Redis.php, line: 200
Please help.
Regards,
Alex.
It looks like Redis is not installed on your server
Thanks all for help! Yes, OS is Ubuntu. But we use AWS and session_redis_server is not localhost, I set it to another host that AWS provided (.....usw2.cache.amazonaws.com). Port is default for redis 6379. Or we can use Redis only on the same server?
First, if you are using another server, make sure redis port is open in your firewall and that its limited to whatever server is using it.
From the CLI, run "redis-cli" and type "ping". You should see a pong back. Later you can use redis-cli with "monitor" to see all is working.
From CLI run your PHP with the -m option. It will tell you if redis is loaded at master. "php -m" will use whatever install is default. If you use a custom path, like 7.0 or something, type out the whole bin "/path/to/php -m".
If there is no redis.so, do a system search for "redis.so". Sometimes it gets installed outside of a PHP install being used.If its not there, install it from PECL or whatever other method. If it is there, you can symlink it to the modules directory of whatever custom PHP path you use, and match the permissions to other modules there.
Finally, ensure any applicable app is able to use it. You made have to enable/write in an extension=redis.so in your preferred php.ini (or redis.ini include). You can include it twice, but it will fill logs with extension already loaded errors.