Using php-ldap in Centos 6.3

强颜欢笑 提交于 2019-12-21 03:57:04

问题


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.


回答1:


Are you sure you have openldap included?

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/en/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/

Instructions from link:

  • yum install php-ldap
  • vi /etc/php.ini
    • add extension=ldap.so
  • service httpd restart


来源:https://stackoverflow.com/questions/14894266/using-php-ldap-in-centos-6-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!