I installed the php redis extension. But when I run the test code, I got the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/redio.so' - /usr/lib/php5/20090626+lfs/redio.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Fatal error: Class 'Redis' not found in /var/www/test/redisTest.php on line 2
My php version is 5.3.10, I installed the new version of phpredis.
May I get your help? THANKS!
The install steps are:
git clone https://github.com/nicolasff/phpredis.git
cd phpredis
phpize
make
make install
Then add a config file in /etc/php5/fpm/confi.d to load redis.so
Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, and sorted sets. Before using Redis with Laravel, we encourage you to install and use the phpredis PHP extension via PECL.
I use PHP 5.3 and installing PHP-Redis using below steps worked just fine for me:
sudo pecl install redis
php.ini
, you may need set extension_dir
to correct value. (can be usr/lib64/php/modules
as above command placed the redis.so in this directory). In my case, I didn't set this.php.ini
:extension=redis.so
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With