Home  >  Article  >  Backend Development  >  Linux 编译 Ldap 扩展

Linux 编译 Ldap 扩展

WBOY
WBOYOriginal
2016-06-23 13:18:351072browse

Ldap 是什么?

Ldap是轻量目录访问协议,英文全称是Lightweight Directory Access Protocol。

开始编译

cd /usr/local/src/php-5.4.36(自己的php版本)/ext/ldap/usr/local/php/bin/phpize./configure --with-php-config=/usr/local/php/bin/php-config --with-ldap//若报错:configure: error: Cannot find ldap.h 执行以下yum install openldapyumyum install openldap-devel//若报错:configure: error: Cannot find ldap libraries in /usr/lib 执行cp -frp /usr/lib64/libldap* /usr/lib///无错误,执行以下makemake install//返回extension_dir:/usr/local/php/lib/php/extensions/no-debug-zts-20060613

将ldap.so加入到extension

cd /usr/local/src/php-5.4.36(自己的php版本)/ext/ldapcp modules/ldap.so /usr/local/php/lib/php/extensions/no-debug-zts-20060613

修改php.ini

extension_dir="/usr/local/php/lib/php/extensions/no-debug-zts-20060613"extension="ldap.so"

重启环境


Thanks ~

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn