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:

/scripts/easyapache

The Apache Build should run smoothly and have a positive result, after which LDAP should appear in phpinfo.

[sdonations]1[/sdonations]

3 COMMENTS

  1. Thank you for the great write up.

    Step 2 doesn’t make good copypasta.

    echo “–with-ldap” >> /var/cpanel/easy/apache/rawopts/all_php5
    vs
    echo “–with-ldap” >> /var/cpanel/easy/apache/rawopts/all_php5

    The double dash in “–with-ldap” got merged, probably by the WYSIWYG editor being used to compose the article.

Leave a Reply