PHP LDAP off Warning
原因
源码安装
缺少 ldap 模块
解决办法
到源码安装目录下,编译安装即可
# cd /lnmp/php-7.3.12/ext/ldap/ # /usr/local/php/bin/phpize # ./configure --with-php-config=/usr/local/php/bin/php-config --with-ldap # make && make install
[root@localhost ]# vim /usr/local/php/etc/php.ini ... extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20180731/ldap.so ...
安装时报错解决办法
错:configure: error: Cannot find ldap.h 解决方法:yum -y install openldap openldap-devel 错:configure: error: Cannot find ldap libraries in /usr/lib 解决方法:cp -a /usr/lib64/libldap* /usr/lib/