Topic: php-pecl-redis does not work

Hello there,

I am running a Cenos6.6 server with Apache 2.2 and php5.5 from remi.
Now I wanted to install the php redis support for the web projects.

After the installation of "php-pecl-redis.x86_64 0:2.2.7-1.el6.remi.5.5" php gives an error message on each startup:
"
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/redis.so' - /usr/lib64/php/modules/redis.so: undefined symbol: igbinary_unserialize in Unknown on line 0
"
this is strange because "php-pecl-igbinary" is installed

so I removed "php-pecl-redis" and downloaded it and compiled it with "pecl install redis".
now it works, but i would definitely prefer the repository installation for the version and coherency control.
It seems as if the packages needs to be recompiled with the updated php headers.


# yum history info 80
Loaded plugins: fastestmirror, priorities
Transaction ID : 80
Begin time     : Fri Jun  5 10:46:29 2015
Begin rpmdb    : 463:6c391fdf8945a15662385fa02912039d5564a8d4
End time       :            10:46:38 2015 (9 seconds)
End rpmdb      : 468:9fd0fdcdc4ee20dc691b8853a3eaefcbdb927c25
Return-Code    : Success
Command Line   : install redis redis-debuginfo php-pecl-redis php-pecl-redis-debuginfo
Transaction performed with:
    Installed     rpm-4.8.0-37.el6.x86_64                         @base
    Installed     yum-3.2.29-43.el6.centos.noarch                 @updates
    Installed     yum-plugin-fastestmirror-1.1.30-17.el6_5.noarch @updates
Packages Altered:
    Dep-Install jemalloc-3.6.0-1.el6.x86_64                          @epel
    Install     php-pecl-redis-2.2.7-1.el6.remi.5.5.x86_64           @remi-php55
    Install     php-pecl-redis-debuginfo-2.2.7-1.el6.remi.5.5.x86_64 @remi-php55-debuginfo
    Install     redis-3.0.1-1.el6.remi.x86_64                        @remi
    Install     redis-debuginfo-3.0.1-1.el6.remi.x86_64              @remi-debuginfo
Scriptlet output:
   1 PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/redis.so' - /usr/lib64/php/modules/redis.so: undefined symbol: igbinary_unserialize in Unknown on line 0
history info


# rpm -qi php-pecl-igbinary
Name        : php-pecl-igbinary            Relocations: (not relocatable)
Version     : 1.2.1                             Vendor: Remi Collet
Release     : 1.el6.remi.5.5                Build Date: vie 29 ago 2014 08:23:42 WEST
Install Date: mar 07 oct 2014 15:31:41 WEST      Build Host: schrodingerscat.famillecollet.com
Group       : System Environment/Libraries   Source RPM: php-pecl-igbinary-1.2.1-1.el6.remi.5.5.src.rpm
Size        : 110897                           License: BSD
Signature   : DSA/SHA1, vie 29 ago 2014 08:32:52 WEST, Key ID 004e6f4700f97f56
Packager    : blog.famillecollet.com/
URL         : pecl.php.net/package/igbinary
Summary     : Replacement for the standard PHP serializer
Description :
Igbinary is a drop in replacement for the standard PHP serializer.
Instead of time and space consuming textual representation,
igbinary stores PHP data structures in a compact binary form.
Savings are significant when using memcached or similar memory
based storages for serialized data.

Re: php-pecl-redis does not work

Sorry, but cannot reproduce.

# php -v
PHP 5.5.25 (cli) (built: May 14 2015 10:02:12) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies

# yum --enablerepo=remi,remi-php55 install php-pecl-redis
...
======================================================================================================================================================
Installation:
 php-pecl-redis                         x86_64                      2.2.7-1.el6.remi.5.5                        remi-php55                      172 k
Installation pour dépendance:
 php-pecl-igbinary                      x86_64                      1.2.1-1.el6.remi.5.5                        remi-php55                       38 k
...
# php -m | egrep "(igb|red)"
igbinary
redis

What is the output of

rpm -qa php\* | sort
rpm -Va php\*
Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php-pecl-redis does not work

Hi there,

Thank you for the quick response.

Today I noticed that there was an update of php5.5 when I installed the php headers to compile redis downloaded from "pecl.php.net"
"
---> Package php.x86_64 0:5.5.19-2.el6.remi will be updated
---> Package php.x86_64 0:5.5.25-1.el6.remi will be an update
"

So I reinstalled "php-pecl-redis" but the old issue returned.


"
# yum install php-pecl-redis
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* base: mirror.brutalsys.com
* epel: mirrors.ircam.fr
* extras: mirror.brutalsys.com
* remi: mirror.h1host.ru
* remi-php55: mirror.h1host.ru
* rpmforge: mirrors.ircam.fr
* updates: mirror.brutalsys.com
2479 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-pecl-redis.x86_64 0:2.2.7-1.el6.remi.5.5 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================
Package                 Arch            Version                          Repository           Size
====================================================================================================
Installing:
php-pecl-redis          x86_64          2.2.7-1.el6.remi.5.5             remi-php55          172 k
Transaction Summary
====================================================================================================
Install       1 Package(s)
Total download size: 172 k
Installed size: 659 k
Is this ok [y/N]: y
Downloading Packages:
php-pecl-redis-2.2.7-1.el6.remi.5.5.x86_64.rpm                               | 172 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-pecl-redis-2.2.7-1.el6.remi.5.5.x86_64                                       1/1
warning: /etc/php.d/redis.ini created as /etc/php.d/redis.ini.rpmnew
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/redis.so' - /usr/lib64/php/modules/redis.so: undefined symbol: igbinary_unserialize in Unknown on line 0
  Verifying  : php-pecl-redis-2.2.7-1.el6.remi.5.5.x86_64                                       1/1
Installed:
  php-pecl-redis.x86_64 0:2.2.7-1.el6.remi.5.5                                                     
Complete!
"

I also took the output of the commands you requested:
# rpm -qa php\* |sort
php-5.5.25-1.el6.remi.x86_64
php-bcmath-5.5.25-1.el6.remi.x86_64
php-channel-phpseclib-1.3-1.el6.remi.noarch
php-cli-5.5.25-1.el6.remi.x86_64
php-common-5.5.25-1.el6.remi.x86_64
php-debuginfo-5.5.19-2.el6.remi.x86_64
php-devel-5.5.25-1.el6.remi.x86_64
php-gd-5.5.25-1.el6.remi.x86_64
php-gmp-5.5.25-1.el6.remi.x86_64
php-ldap-5.5.25-1.el6.remi.x86_64
php-mbstring-5.5.25-1.el6.remi.x86_64
php-mcrypt-5.5.25-1.el6.remi.x86_64
phpMyAdmin-4.2.10.1-1.el6.remi.noarch
php-mysqlnd-5.5.25-1.el6.remi.x86_64
php-pdo-5.5.25-1.el6.remi.x86_64
php-pear-1.9.5-3.el6.remi.noarch
php-pear-PhpDocumentor-1.4.4-5.el6.remi.noarch
php-pear-XML-Beautifier-1.2.2-6.el6.remi.noarch
php-pear-XML-Parser-1.3.4-6.el6.remi.noarch
php-pecl-apcu-4.0.7-1.el6.remi.5.5.x86_64
php-pecl-apcu-debuginfo-4.0.7-1.el6.remi.5.5.x86_64
php-pecl-gearman-1.1.2-2.el6.remi.5.5.x86_64
php-pecl-igbinary-1.2.1-1.el6.remi.5.5.x86_64
php-pecl-igbinary-debuginfo-1.2.1-1.el6.remi.5.5.x86_64
php-pecl-jsonc-1.3.7-1.el6.remi.5.5.x86_64
php-pecl-jsonc-devel-1.3.7-1.el6.remi.5.5.x86_64
php-pecl-redis-2.2.7-1.el6.remi.5.5.x86_64
php-pecl-redis-debuginfo-2.2.7-1.el6.remi.5.5.x86_64
php-pecl-xdebug-2.2.5-1.el6.remi.5.5.x86_64
php-pecl-zip-1.12.4-1.el6.remi.5.5.x86_64
php-php-gettext-1.0.11-4.el6.remi.noarch
php-phpseclib-crypt-aes-0.3.8-1.el6.remi.noarch
php-phpseclib-crypt-base-0.3.8-1.el6.remi.noarch
php-phpseclib-crypt-rijndael-0.3.8-1.el6.remi.noarch
php-process-5.5.25-1.el6.remi.x86_64
php-recode-5.5.25-1.el6.remi.x86_64
php-Smarty2-2.6.28-1.el6.remi.noarch
php-soap-5.5.25-1.el6.remi.x86_64
php-tcpdf-6.0.095-1.el6.remi.noarch
php-tcpdf-dejavu-sans-fonts-6.0.095-1.el6.remi.noarch
php-tidy-5.5.25-1.el6.remi.x86_64
php-xml-5.5.25-1.el6.remi.x86_64
# rpm -Va php\*
S.5....T.  c /etc/pear.conf
.......T.    /var/lib/pear/.channels/.alias/pecl.txt
S.5....T.    /var/lib/pear/.channels/pecl.php.net.reg
..5....T.  c /etc/php.d/redis.ini
S.5....T.  c /etc/php.d/igbinary.ini
S.5....T.  c /etc/php.d/apcu.ini
S.5....T.  c /etc/php.ini
S.5....T.  c /etc/php.d/xdebug.ini
S.5....T.  c /etc/httpd/conf.d/phpMyAdmin.conf
.......T.  c /etc/phpMyAdmin/config.inc.php

Re: php-pecl-redis does not work

> ..5....T.  c /etc/php.d/redis.ini
> S.5....T.  c /etc/php.d/igbinary.ini

What have you changed there ?

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php-pecl-redis does not work

Hello,

Thank you for the useful hint.
I noticed that I have igbinary installed, but it was not loaded because of another issue with apc that is also working with it.

I enabled it now and it works now.

Thank you for your kind interest and your fast reply.



# cat /etc/php.d/redis.ini
; Enable redis extension module
extension = redis.so
; phpredis can be used to store PHP sessions.
; To do this, uncomment and configure below
; RPM note : save_handler and save_path are defined
; for mod_php, in /etc/httpd/conf.d/php.conf
; for php-fpm, in /etc/php-fpm.d/*conf
;session.save_handler = redis
;session.save_path = "tcp://host1:6379?weight=1, tcp://host2:6379?weight=2&timeout=2.5, tcp://host3:6379?weight=2"


# cat /etc/php.d/igbinary.ini
; Enable igbinary extension module
;extension=igbinary.so
; Enable or disable compacting of duplicate strings
; The default is On.
igbinary.compact_strings=Off
; Use igbinary as session serializer
;session.serialize_handler=igbinary
; Use igbinary as APC serializer
;apc.serializer=igbinary

Re: php-pecl-redis does not work

smile

> I enabled it now and it works now.

Closing this thread.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi