PHP, LDAP Integration on Windows Server 2003
Posted: Wed May 03, 2006 3:40 pm
We're using a help desk project based on PHP and MySQL running on a Windows Server 2003 system. The Help Desk we use recently released an update that allows LDAP authentication against our active directory. This seems relatively easy to configure, but we've hit something of a snag.
We can't seem to get the PHP running on the server (PHP 5 through the XAMPP distribution) to make use of the the LDAP functionality. Per PHP.net's documentation:
The error message, for the record, is:
Just not sure how to get PHP to load those windows DLLs for the LDAP functionality. Also, yes, I have changed PHP.INI to uncomment those DLLs.
We can't seem to get the PHP running on the server (PHP 5 through the XAMPP distribution) to make use of the the LDAP functionality. Per PHP.net's documentation:
We've got the DLLs copied to their correct destinations, but whenever we try to enable the LDAP authentication, the page errors out at the first line in the script that calls ldap_connect() saying it is an undefined function.Note to Win32 Users: In order to enable this module on a Windows environment, you must copy several files from the DLL folder of the PHP/Win32 binary package to the SYSTEM folder of your windows machine. (Ex: C:\WINNT\SYSTEM32, or C:\WINDOWS\SYSTEM). For PHP <= 4.2.0 copy libsasl.dll, for PHP >= 4.3.0 copy libeay32.dll and ssleay32.dll to your SYSTEM folder.
The error message, for the record, is:
This isn't critical, but it is driving me a little batty. I'm pretty new to PHP, but I've made LDAP interoperability with other OSS projects work before, so I'm confident about that part... We could live with bringing the user community onto the helpdesk with different passwords, but the perfectionist in me wants single-signon...Fatal error: Call to undefined function ldap_connect() in C:\Program Files\xampp\htdocs\oozv163_project\common\common.php on line 171
Just not sure how to get PHP to load those windows DLLs for the LDAP functionality. Also, yes, I have changed PHP.INI to uncomment those DLLs.