Enablng LDAP for PHP, XAMPP 1.8.1 on Windows 7

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Enablng LDAP for PHP, XAMPP 1.8.1 on Windows 7

Postby chrisand6 » 08. March 2013 16:05

Hello,

FIrst of all, I'd like to commend the creators of this software - my manager and I have been extraordinarily impressed in the quality and ease of this program suite. I'd also like to thank all those on this forum who provide their time and expertise freely.

Now on to business.
XAMPP Version: 1.8.1 (downloaded last week)
OS: Windows 7 32-bit.

Issue
I had been trying to enable LDAP for PHP for about a day now without success. I have finally figured it out and wanted to share my experience with others that may have had to search for this information all over the net.

Most of the troubleshooting I have found is here: http://wptidbits.com/webs/enable-php-ldap-module-in-xampp/
No to say I haven't looked elseware, but this is a good 'summary' of what has fixed this problem for most people.

I did not see the LDAP section in the PHPinfo() through: http://localhost/xampp/index.php

Using the control panel, I have opened the PHP.ini file and uncommented "extension=php_ldap.dll" - which works for most people.
I have ensured that the following files are in this location: /xampp/php/ (per instructions here: http://forums.devshed.com/showthread.php?p=1173879)
php_ldap.dll (manually copied to this location from xampp/php/ext - which may not be necessary to put it in the /xampp/php folder)
libsasl.dll (included in the 1.8.1 installation)
libeay32.dll (included in the 1.8.1 installation)
ssleay32.dll (included in the 1.8.1 installation)

I ensured that these same files are in the System32 directory as well (some forum said this was necessary, so I copied them - but it may not be necessary)

In each case, I restarted Apache through the control panel successfully, and refreshed the PHPinfo() page through the browser, without seeing any difference. There were no errors on the XAMPP Control panel (but I did have some before I was running it as Administrator - even if you restart - you have to select 'run as administrator' to keep the control panel from crashing with a "System Error - 5"). I am running v3.1.0 of the control panel.

I physically restarted my computer after moving all the files around, but usually starting and stopping Apache is sufficient.

I reviewed the PHP documentation (http://php.net/manual/en/ldap.installation.php) and noted that the LDAP functionality may need to be 'installed' - so I tried to see if there is a third party LDAP software that must be installed. While it seems that this is the case for Linux and Unix installations of Apache, my understanding is that the LDAP files are already included in the Windows installation of XAMPP. (and they are! - no additional files are necessary!)

Most recently, I took the four .dll files noted above and placed them in the windows/system directory. I didn't think this would do anything (as the folder is actually empty in windows 7) - but PHP must be looking there for them instead of the system32 folder, because I FINALLY got the LDAP section to appear on the PHPinfo().

I actually figured all this out while creating this post with a question - but I figured that I might as well post it to save someone else the trouble in the future. :)
chrisand6
 
Posts: 1
Joined: 08. March 2013 14:58
XAMPP Version: 5.6.3
Operating System: Windows 7 32 Bit

Re: Enablng LDAP for PHP, XAMPP 1.8.1 on Windows 7

Postby JonB » 08. March 2013 16:37

Thanks for your contribution

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Enablng LDAP for PHP, XAMPP 1.8.1 on Windows 7

Postby cibu » 09. December 2013 12:51

Thank you for the inspriration

If I tries to enable LDAP and restart xamp I get the following two error messages:
The program could not be started, because the libsasl.dll is missing at this computer. Reinstall the program to fix the problem.

PHP Startup: Unable to load dynamic library '\XAMPP 1.8.1\php\ext\php_ldap.dll' - The module was not found.


With the "Process Monitor" I figured out that the DLL is searched in
\XAMPP 1.8.1\apache\bin\
\XAMPP 1.8.1\
and all directories of the PATH

FIX:
copy "\XAMPP 1.8.1\php\ext\libsasl.dll" to "\XAMPP 1.8.1\apache\bin\" and everything is all right.
cibu
 
Posts: 1
Joined: 09. December 2013 12:33
XAMPP Version: 1.8.2-4
Operating System: WinXP/Win7


Return to XAMPP for Windows

Who is online

Users browsing this forum: Ecklory and 60 guests