Tuesday, September 1, 2020

How to setup Apache2/PHP5.6 with Redis extension?

 The most recent version of the Redis extension can only be installed on PHP 7.0 and above. If you need to use the Redis extension on PHP 5.4, 5.5, or 5.6, you must run Version 2.2.8.

Ubuntu Commands Steps

sudo apt-get install -y software-properties-common

LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php

apt-get update

apt-get install php5-redis redis-tools

service apache2 graceful

php -m |grep redis


OR 

Download Redis 2.2.8 from the URL

https://launchpad.net/ubuntu/+source/php-redis/3.0.0+2.2.8-1

cd /root/redis-2.2.8

phpize && ./configure && make && sudo make install


OR

use the next docker

docker pull dawtaylor/php-redis-session:5.6-apache

No comments: