PHP-LDAP Authentication Fatal Error

gglollc
gglollc used Ask the Experts™
on
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 10.0.0.146] 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: http://10.0.0.146/materials/wp-admin/options-general.php?page=simple-ldap-login&updated=true

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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
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  "extension=ldap.so" 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.

Author

Commented:
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