Page 1 of 1

LDAP Not loading

Posted: Fri Jan 22, 2010 10:12 am
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

Re: LDAP Not loading

Posted: Fri Jan 22, 2010 10:49 am
by Eran
Did you enable LDAP routing on the IIS server?

Re: LDAP Not loading

Posted: Fri Jan 22, 2010 11:10 am
by jordonshaw
No. I'm not positive that I know how to do that.

Could you help?

Thanks,
Jordon

Re: LDAP Not loading

Posted: Fri Jan 22, 2010 11:13 am
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

Re: LDAP Not loading

Posted: Fri Jan 22, 2010 11:23 am
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?

Re: LDAP Not loading

Posted: Fri Jan 22, 2010 11:41 am
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

Re: LDAP Not loading

Posted: Fri Jan 22, 2010 12:48 pm
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

Re: LDAP Not loading

Posted: Fri Jan 22, 2010 2:29 pm
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

Re: LDAP Not loading

Posted: Fri Jan 22, 2010 2:43 pm
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!!!

Re: LDAP Not loading

Posted: Fri Jan 22, 2010 2:46 pm
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

Re: LDAP Not loading

Posted: Fri Jan 22, 2010 3:01 pm
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