首页 > Web开发 > 详细

终于解决ERROR: PHP's 'ldap' extension is not installed/enabled. Please check your MR

时间:2019-06-22 17:11:09      阅读:426      评论:0      收藏:0      [点我收藏+]

我的系统是centos,php是yum的5.6.40,php-ldap也是yum的5.6.40,配置好ldap后,登录时提示ERROR: PHP‘s ‘ldap‘ extension is not installed/enabled. Please check your MRBS and web server configuration.

先是查看系统日志,或者php -m,提示:PHP Warning:  PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/ldap.so‘ - /usr/lib64/php/modules/ldap.so: cannot open shared object file: No such file or directory in Unknown on line 0

最后的解决思路:先下载php5.6.40包,解压缩得到php-ldap5.6.40,上传到服务器,解压缩,准备环境

phpize

./configure

这里会报错,报错内容都在最后,第一次:

configure: error: in `/root/php-5.6.4/ext/ldap‘:
configure: error: no acceptable C compiler found in $PATH
See `config.log‘ for more details

解决方案,安装gcc,yum install gcc

第二次:configure: error: Cannot find ldap.h

解决办法:yum install openldap openldap-devel -y

第三次:configure: error: Cannot find ldap libraries in /usr/lib.

解决办法:cp -frp /usr/lib64/libldap* /usr/lib/

然后继续./configure,最后提示

config.status: creating config.h
config.status: executing libtool commands

一切正常,然后

make

make install

至此问题解决!如果帮到了你,请留言让我知道!

终于解决ERROR: PHP's 'ldap' extension is not installed/enabled. Please check your MR

原文:https://www.cnblogs.com/leelice/p/11069349.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!