LDAP Not loading

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
jordonshaw
Forum Newbie
Posts: 7
Joined: Fri Jan 22, 2010 10:05 am

LDAP Not loading

Post by jordonshaw »

Ok, so at this point, I'm about to pull my hair out (and I don't have much). So, I need to enable LDAP in my PHP install. So, everything works perfectlly in PHP and has been for a while now. All other extension that I have uncommented in the PHP.INI file, load fine. I uncommented the php_ldap.dll in the PHP.INI file and it didn't load. So, I did some research and found an article that you need to copy the lebeay32.dll and the ssleay32.dll from your PHP directory into your system32 and windows directory, which I did. Still will not load the php_ldap.dll. I have restarted IIS many times, I have restarted the machine, many times. Still nothing. I run this command:

Code: Select all

echo extension_loaded('ldap') ? 'Loaded ' : 'NOT Loaded ';
and this one:

Code: Select all

print_r(get_loaded_extensions());
The first one comes back Not Loaded and the second one shows everything that I have loaded and ldap isn't one of them.

I'm lost at this time and could really, really use some help here! :banghead:

Thanks,
Jordon
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: LDAP Not loading

Post by Eran »

Did you enable LDAP routing on the IIS server?
jordonshaw
Forum Newbie
Posts: 7
Joined: Fri Jan 22, 2010 10:05 am

Re: LDAP Not loading

Post by jordonshaw »

No. I'm not positive that I know how to do that.

Could you help?

Thanks,
Jordon
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: LDAP Not loading

Post by Eran »

I have very little knowledge of IIS (work primarily with Apache), but I would think the documentation is the right place to start - http://www.microsoft.com/technet/prodte ... 72703.mspx
jordonshaw
Forum Newbie
Posts: 7
Joined: Fri Jan 22, 2010 10:05 am

Re: LDAP Not loading

Post by jordonshaw »

Let me ask you this. At this point, I'm not even trying to connect to LDAP, just trying to get PHP to load the extension. I can see IIS blocking the connection to LDAP, but would it block the extension from loading in PHP?
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: LDAP Not loading

Post by Eran »

It's definitely possible that it fails to load the extension since the webserver is not responding to it as it expects it to. Enable display_startup_errors in your php configuration, and see if it reports anything useful
jordonshaw
Forum Newbie
Posts: 7
Joined: Fri Jan 22, 2010 10:05 am

Re: LDAP Not loading

Post by jordonshaw »

Alright, so I enabled LDAP in IIS, no go. I turned on start up errors and I get the following message about LDAP:

PHP Startup: ldap: Unable to initialize module
Module complied with module API=20060613, debug=0, thread-safety=1
PHP complied with module API=20060613, debug=0, thread-safety=0
These options need to match


So, now my question is, does anybody know how to make those match?

Thanks,
Jordon
jordonshaw
Forum Newbie
Posts: 7
Joined: Fri Jan 22, 2010 10:05 am

Re: LDAP Not loading

Post by jordonshaw »

Ok, so I went ahead and uninstalled PHP and then reinstalled it. All the dll's are where they should be and now I'm getting a statup message that says:

"PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\php_ldap.dll' - The specified module could not be found"

The problem is, I know that the dll is there. Any suggestions?

Jordon
jordonshaw
Forum Newbie
Posts: 7
Joined: Fri Jan 22, 2010 10:05 am

Re: LDAP Not loading

Post by jordonshaw »

Ok, so I just looked and there were several .dll files that was in the .zip download, but not in my php directory. I copied them and now it loads the php_ldap.dll; however, I'm now back to the same message of the module and php are complied with different options, like before. I can't win for losing!!!
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: LDAP Not loading

Post by Eran »

This might be a good clue -
http://www.php.net/manual/en/ldap.requirements.php

I personally have no experience of compiling php with different options. Perhaps someone else here can comment on that
jordonshaw
Forum Newbie
Posts: 7
Joined: Fri Jan 22, 2010 10:05 am

Re: LDAP Not loading

Post by jordonshaw »

My prayers have been answered!!! I went back to php.net/downloads.php and this time I downloaded the non-thread-safe-zip-package and took the php_ldap.dll file out of it, replaced the one that I had, restarted IIS and it finally loaded without error! Thank you so much for your help!

Jordon
Post Reply