I have a PHP app that calls ldap_connect() on RHEL 8.1 which fails. I am migrating this PHP app from RHEL 7.9 to RHEL 8.1 and from PHP 5.4.16 to PHP version 8.3.9. On the new server, when my code reaches ldap_connect() it exits with no error.
Looking at the output from info.php, on the old server I have the following modules installed. They are not installed on the new server. I am not sure how to install these modules, which I believe is my problem.
mod_authnz_ldap mod_auth_openidc mod_authnz_external mod_php
I am calling ldap_connect() as follows, where $host is the ldap host, the same one that works on my old server:
$mydap= ldap_connect($host) or die(‘Error connecting to LDAP’);
I have also read where I need to edit my php.ini file to uncomment the line: extensions=php_ldap.so
However, I don’t have a line like that in /etc/php.ini This command, generates the following output:
locate php.ini
/etc/php.ini
/usr/share/doc/php-common/php.ini-development
/usr/share/doc/php-common/php.ini-production