PHP编译安装ldap扩展模块

可以通过phpize编译安装php扩展模块

1
2
3
4
5
# yum install openldap openldap-devel
# cd php-7.2.20/ext/ldap/
# /usr/local/php/bin/phpize
# ./configure --with-ldap --with-php-config=/usr/local/php/bin/php-config
# make && make install

将编译后生成的so文件复制到php.ini配置文件指定的extension_dir中

1
# cp php-7.2.20/ext/ldap/modules/ldap.so /usr/lib64/php/modules/

修改php配置

1
2
3
4
# vim /usr/local/php/etc/php.ini

extension_dir = "/usr/lib64/php/modules/"
extension = ldap.so

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :