Linux 编译 Ldap 扩展

WBOY
Release: 2016-06-23 13:18:35
Original
1084 people have browsed it

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 ~

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template