Enabling LDAP on a cPanel server as a php module can not be accomplished by only selecting it in EasyApache, this being the Apache module only. Unfortunately. But, enabling LDAP php module it is not that complicated as one might think. Just follow the instructions below:
1. Build LDAP Apache module through EasyApache, enabling it on the Exhaustive options list and rebuild EasyApache.
2. Add LDAP support with PHP by executing the following command in SSH as root:
echo “–with-ldap” >> /var/cpanel/easy/apache/rawopts/all_php5
3. Rebuild EasyApache again:
The Apache Build should run smoothly and have a positive result, after which LDAP should appear in phpinfo.