在Centos 6.3中使用php-ldap [英] Using php-ldap in Centos 6.3

查看:85
本文介绍了在Centos 6.3中使用php-ldap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用php构建LDAP接口,但是遇到了这个奇怪的问题.我已经在基本的php安装中使用yum安装了php-ldap软件包,但是每当我调用ldap_connect()时,它都说函数未定义.看到phpinfo(),我可以验证ldap扩展名是否确实已安装并启用.

I'm trying to build a LDAP interface using php but have run into this strange problem. I have installed the php-ldap package using yum on my base php install but whenever I call ldap_connect() it says the function is undefined. Seeing phpinfo() I can verify that the ldap extension is indeed installed and enabled.

推荐答案

确定要包含openldap吗?

Are you sure you have openldap included?

我刚刚意识到我有一个相同的问题,即phpinfo向我展示了apache加载的其他几个 ldap 模块,但是我没有openldap

I just realized I have the same issue where phpinfo shows me several other ldap modules loaded by apache, but I do no have openldap

http://www.php.net/manual/zh/ldap. installation.php

我刚刚按照以下说明成功安装:

I just got a successful install following the directions here: http://www.aoddy.com/2009/01/18/how-to-install-php-ldap-module-on-centos5/

链接说明:

  • yum install php-ldap
  • vi /etc/php.ini
    • 添加extension=ldap.so
    • yum install php-ldap
    • vi /etc/php.ini
      • add extension=ldap.so

      这篇关于在Centos 6.3中使用php-ldap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆