简体   繁体   中英

Fatal error: Call to undefined function ldap_connect()

I'm running a CentOS 6.5/PHP virtual box and I'm getting this error when running an LDAP PHP app:

Fatal error: Call to undefined function ldap_connect()

I thought perhaps php-ldap didn't install so I ran this:

$ sudo yum install php-ldap
Loaded plugins: priorities
Setting up Install Process
1134 packages excluded due to repository priority protections
Package php-ldap-5.5.38-5.el6.remi.x86_64 already installed and latest version
Nothing to do

I also updated my php.ini file like so:

[ldap]
; Sets the maximum number of open links or -1 for unlimited.
ldap.max_links = -1
extension=ldap.so

However, the error persists. Any ideas what I'm doing wrong?

If you are running PHP as apache module, then you should check the apache logs for any startup errors? Generally problems loading modules are present there. Also check php.ini setting to see that extension_dir is set to have the directory containing the ldap.so

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM