Symptoms
WHM/cPanel generates a 500 error when accessing phpMyAdmin, WP Toolkit, or Roundcube Webmail, including one of the following error message in the cPanel error logs:
cpanel_php_fpm libldap_r-2.4.so.2: cannot open shared object file: No such file or directory
/usr/local/cpanel/3rdparty/bin/php-cgi: error while loading shared libraries: libldap_r-2.4.so.2: cannot open shared object file: No such file or directory
restartsrv_cpanel_php_fpm[443324]: /usr/local/cpanel/3rdparty/sbin/cpanel_php_fpm: error while loading shared lib
Description
This error indicates that the package openldap-compat is missing from your server. This package is usually installed with the operating system and is a package that cPanel requires but does not install on its own. Some RHEL-based server images may not come with this package pre-installed.
Workaround
Install the package with your package manager:
dnf install openldap-compat