PHP-LDAP Authentication Fatal Error

gglollc used Ask the Experts™
I am attempting to setup Active Directory authentication For WordPress using the Simple LDAP Login plug-in.

I first discovered that php was not ldap enabled. I found php-ldap.i686 and installed that which I believe should work to enable ldap.It is still not working but getting farther along. When I attempt to open WordPress the logon page comes up and it has an error: ERROR: The username field is empty.

The apache log shows the following error:
[Thu Jan 28 12:47:54 2010] [error] [client] PHP Fatal error: Call to undefined function ldap_connect() in /var/www/html/materials/wp-content/plugins/simple-ldap-login/adLDAP.php on line 157, referer:

Can anyone shed some light on this? Does this mean that PHP is still not fully enabled for LDAP?

We are running on Fedora 12.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Yes, if the php says that the function is undefined, your ldap extendion isn't enabled in PHP. Check your php.ini file for such string  "" or extension dir e.g. /php.d/ for ldap.ini file with equal string. Check that this string is without leading ; symbol. If you cannot find this string in your php.ini file you must rebuild your ldap extension.


Great info, thanks.
Also check php_short_tags are ON in your php.ini - some of the plugins I've seen are written using <? /> rather than <? php    ?> tags, whcih may mean some fo the code is missed.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial