The library ldap is not available

I am currently trying to set up the authentication of nextcloud for production purpose but I am not able to do it here is my error:

This app cannot be installed because the following dependencies are not fulfilled:

The library ldap is not available.

I am running on Centos7 with the latest version of php-ldap and php 7.2.10, nextcloud 15.0.5
I have obviously installed the php-ldap package
I try to restart httpd services and reboot several time

But it does not work… Any idea?

Do I need to modify the php.ini file?

Did you try searching the forum?

1 Like

Yes but it do not solve my issue,

What I noticed is the following:

Here is the result of the “rpm -qa | grep php” command:

rh-php72-php-common-7.2.10-3.el7.x86_64
rh-php72-php-pear-1.10.5-1.el7.noarch
sclo-php72-php-pecl-redis4-4.1.1-1.el7.x86_64
rh-php72-php-gd-7.2.10-3.el7.x86_64
sclo-php72-php-pecl-imagick-3.4.3-3.el7.x86_64
rh-php72-runtime-1-2.el7.x86_64
rh-php72-php-zip-7.2.10-3.el7.x86_64
rh-php72-php-cli-7.2.10-3.el7.x86_64
rh-php72-php-xml-7.2.10-3.el7.x86_64
sclo-php72-php-pecl-igbinary-2.0.8-1.el7.x86_64
rh-php72-php-mysqlnd-7.2.10-3.el7.x86_64
rh-php72-1-2.el7.x86_64
rh-php72-php-pecl-apcu-5.1.12-1.el7.x86_64
rh-php72-php-opcache-7.2.10-3.el7.x86_64
rh-php72-php-intl-7.2.10-3.el7.x86_64
php-ldap-5.4.16-46.el7.x86_64
rh-php72-php-json-7.2.10-3.el7.x86_64
rh-php72-php-process-7.2.10-3.el7.x86_64
rh-php72-php-pdo-7.2.10-3.el7.x86_64
rh-php72-php-7.2.10-3.el7.x86_64
rh-php72-php-mbstring-7.2.10-3.el7.x86_64
php-common-5.4.16-46.el7.x86_64

When I execute the php script to have the info of php used by my web server here is the result:

As you can see all my php files are located in /etc/opt/rh/rh-php72/
And my .so files in /usr/lib64/php/modules/ldap.so

Howerer when I installed php-ldap the .ini file is located in /etc/php.d/ldap.ini or it should be /etc/opt/rh/rh-php72/php.d/ldap.ini

Pretty new about those stuff so I should miss something but I don’t know what…

Hi Make sure that you have 15-rh-php72-php.conf file and rename/move php .conf files of other php versions in the below locations,

/etc/httpd/conf.d/
/etc/httpd/conf.modules.d/

image

What’s the differences between the rh-php72.php.conf and the 15-rh-php72-php.conf files?

But php-ldap is 5.4 and php is 7.2 and I do not succed to install php-ldap on a higher version

are you able to find the “ldap.so” file in that location?

/opt/rh/rh-php72/root/usr/lib64/php/modules/ldap.so

If not, that is the main issue.

You may find the logs indicating the issue at “/etc/httpd/logs” location.

Also make sure that when you make some changes you restart apache.

In my case setting a softlink to the right php.d directory helped:

ln -s /etc/opt/rh/rh-php72/php.d /etc/php.d