Install the openldap rpms
==================
WHM>Software>Install RPM
install openldap openldap-clients openldap-devel openldap-servers
or install it via yum
yum install openldap openldap-clients openldap-devel openldap-servers
Then check the version of PHP you are using,
if you are using php5
cd /var/cpanel/easy/apache/rawopts/
create a file named all_php5 in it
then add the line --with-ldap=/usr
save and quit!
Then run /scripts/easyapache
php -m
it shoud should show ldap :) :) :)
Reff:
http://niyashussain.com/2009/06/compile-php-5-with-ldap-support-in-cpanel-centos-5/