Linux compiling Ldap extension
What is Ldap?
Ldap is a Lightweight Directory Access Protocol, which is short for Lightweight Directory Access Protocol.
Start compilation
Cd/usr/local/src/php-5.4.36 (your php version)/ext/ldap/usr/local/php/bin/phpize. /configure -- with-php-config =/usr/local/php/bin/php-config -- with-ldap // if the error is: configure: error: Cannot find ldap. h. run the following yum install openldapyumyum install openldap-devel // if the following error is reported: configure: error: cannot find ldap libraries in/usr/lib run cp-frp/usr/lib64/libldap */usr/lib // no error. run the following makemake install // to return extension_dir: /usr/local/php/lib/php/extensions/no-debug-zts-20060613
Add ldap. so to extension
Cd/usr/local/src/php-5.4.36 (your php version)/ext/ldapcp modules/ldap. so/usr/local/php/lib/php/extensions/no-debug-zts-20060613
Modify php. ini
Extension_dir = "/usr/local/php/lib/php/extensions/no-debug-zts-20060613" extension = "ldap. so"
Restart the environment
Thanks ~