PHP LDAP module does not seem to be present

PHP LDAP module does not seem to be present

by chris johnson -
Number of replies: 53

I'm a moodle newbie, and installed Moodle 1.5.2 on Windows 2003 server using Easy PHP from http://moodle.org/doc/?file=installamp.html#windows.  The install worked well, and I was able to log on.  I went to switch the authentication method to LDAP, and received the following message:

Warning: The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled.

I uncommented extension=php_ldap.dll in the php.ini file in c:\program files\easyphp1-7\apache, thinking that would solve the problem.  I also specified the extensions directory c:\program files\easyphp1-7\php\extentions\.

Now when I start easy.php, I recieve a Windows dialog box that says apache.exe - unable to locate component.  The message is "This application has failed to start because SSLEAY32.dll was not found.  Re-installing the application may fix this problem." 

Then I get a second dialog box that says "Unknown(): Unload to load dynamic library 'C:\Program Files\EasyPHP1-7\php\extensions\php_ldap.dll' - The specified module could not be found."

TIA!

Average of ratings: -
In reply to chris johnson

Re: PHP LDAP module does not seem to be present

by chris johnson -
Fixed, I added my PHP directory to my Windows Path.
In reply to chris johnson

Re: PHP LDAP module does not seem to be present

by Lars Jensen -
Hi Chris,

We're trying to test ldap authentication on a windows installation of moodle, with Easyphp, and we ran into the same problem with the ldap module not being present. We tried to include the php directory in the windows path, but this didn't fix it. How exactly did you fix this?

Thanks,
Lars.
In reply to Lars Jensen

Re: PHP LDAP module does not seem to be present

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
One way you may solve it is by copying SSLEAY32.dll in C:\WINDOWS\SYSTEM32. That way PHP & Apache will be able to find the DLL and load it.

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: PHP LDAP module does not seem to be present

by Luke Lee -

hi, I having an issue for this also.  LDAP server is disabled for my case. This is on the server and its not local host. How can I install or enable it?

Attachment Screen Shot 2012-05-18 at 11.45.31 PM.png
In reply to chris johnson

Re: PHP LDAP module does not seem to be present

by Kent Sweigart -
Chris,

I'm at the same place you were in October.

I added the Windows Path to the php.ini and the error goes away, but I still get the Warning: The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled. when going to set up LDAP.

Any clues?

Kent
In reply to Kent Sweigart

Tárgy: Re: PHP LDAP module does not seem to be present

by Csaba Vágvölgyi -
Just one idea:
Try to remove ; (comment sign) from the line
;extension=php_ldap.dll
in the php.ini file and then restart Apache!

Csaba
In reply to chris johnson

Re: PHP LDAP module does not seem to be present

by Stephan Unknown -
I've got the same error and did all the things mentioned in this thread. I've put the 2 dll's in my /System32/ directory and removed the ';' character in front of the extension=php_ldap.dll, but he still nags about it. When typing in "php -m" on the command line it indicates that ldap is installed. What more could be wrong?

I'm using the following versions:

Xampp with:
Apache 2
MySql 5
Php 5

Moodle 1.53

In reply to Stephan Unknown

Re: PHP LDAP module does not seem to be present

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Login as admin into Moodle, and go to http://my.moodle.site/admin/phpinfo.php and check that the ldap extension is listed on the generated page.

If it's not there, then you'll have to check php.ini, your PATH variable, that you have copied the DLLs in System32 and then restart Apache to apply any changes you may have done.

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: PHP LDAP module does not seem to be present

by Ian Scott -

I'm on a fresh install of PHP 5.1.2 using IIS6 Windows 2003 - I followed the directions to install PHP manually and all worked except LDAP.

I've placed the two necessary DLL files in both the System 32 directory and within the PHP directory (as recomended) - set system path. Uncommented LDAP in the .ini file - even tested putting a comment on JAVA to see if I could make it stop (which it did) - sooo - LDAP doesn't report as operational with <?php phpinfo(); ?> - any ideas out there?

I tried Iñaki's method of using ldaptest but there is no error report - probably moodle setup stomping on it.

I've got Softerra's LDAP browser working so I know the correct settings to get the LDAP info.

No idea how to proceed.

In reply to Ian Scott

Re: PHP LDAP module does not seem to be present

by Steve Power -

I had similar problems with my setup. In the end I found something in an adode forum which told me to move the php.ini file into the c:\windows folder. having done this it worked.

So much for Open Source being quirky Microsoft have it down to a fine art.

Hope this helps.

Regards
Steve

In reply to Ian Scott

Re: PHP LDAP module does not seem to be present

by Ian Scott -

Solved - thought I had done everything - followed all suggestions - decided I would check everything - clue was cmd php -m didn't work from cmd line until I went into php diectory - I had lost (never put in?) the php directory in the system variable path - once added ldap worked.

Find it strange that everything worked except this one process but then it is windows ;)

In reply to Ian Scott

Re: PHP LDAP module does not seem to be present

by Edward Goytia -
I'm a Moodle newbie who's been experiencing exactly the same problem except I'm not getting the same reults you are. I've edited the php.ini file, updated the path variables in Windows and even copied over the php.ini and php_ldap.dll files into the System32 directory but I still get that little red error when trying to configure LDAP in Moodle. php -m says the module is loaded but it doesn't appear in the phpinfo readout so clearly something's still off.  Any ideas on what I might be missing?
In reply to Edward Goytia

Re: PHP LDAP module does not seem to be present

by George Martini -

I too have tried all the suggestions.  Nothing would work.

I initially used the Windows package that had everything needed.  I could not get this to work.  I finally downloaded and installed EasyPHP.  Then I installed Moodle.  It worked!

Hope this helps.

In reply to chris johnson

Re: PHP LDAP module does not seem to be present

by George Martini -

I still cannot get LDAP working:

I have a Windows XP "test" machine setup using the pre-packaged Moodle Windows installation.  Like most everyone else, it installs fine and I can logon with manual accouts.  I NEED to get LDAP auth to work.  I have tried ALL the suggestions in this post.  I still get:

"Warning: The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled"

php -m and phpinfo both report the ldap module(s) as being installed.

I installed Moodle on a test XP machine for speed of install.  This is not the platform I intent to use for production...if I get that far.

Any additional suggestions would be greatly appreciated!

In reply to chris johnson

Re: PHP LDAP module does not seem to be present

by Scott Hardwick -

Having had the same troubles as many of the others in this thread, I wanted to let you know how I solved the PHP ldap module problem.

I am running Windows 2003 and am using the Windows Moodle Quick Installer

1. I had to put the php path in my environment path variable in windows 2003.
   To check to see if yours works before beginning, do start, run, cmd and enter
   Type php -m, you should see output, if not you need to set the path
   To see what your path currently is, type path and hit enter

   To set the path on Windows 2003, go to the control panel and click on System.  Then click on the advanced tab and you should see at the bottom a button for environment variables, click that. You now have a box where you can edit several things including your path.

(Keep in mind that if you use %SystemRoot% in you php path that it does NOT point to c:\, instead to c:\Windows\)

2. I had to alter the PHP.ini file.
   Interestingly enough, I kept thinking I had done this. It turns out that at least on my system, I have two php.ini files and one php5.ini.  To find out which one your system is actually using, login to moodle as the administrator, go to the admin page and at the very bottom press the php Info button. About the seventh line down you should see something like this:

Configuration File (php.ini) Path  C:\moodle\apache\bin\php.ini 

Open and edit that file and remove the semicolon (;) in front of the line :
extension=php_ldap.dll

3. After these two things restart apache and you should no longer receive the red error message.

Scott

Average of ratings: Useful (1)
In reply to Scott Hardwick

Re: PHP LDAP module does not seem to be present

by Peter Howarth -

Aha!  Finally!

Scott's reply helped me solve my problem.

Anyone else reading this, make sure you are editing the correct PHP.ini...!  Using Scott's method (Log into moodle as Admin, go to Admin page, click 'PHP Info' button, few lines down it gives location of configuration file) I realised that of the three I had been editing, none of them was correct.

If you use the Moodle full install (PHP/Apache/MySQL) the php.ini you need is in

%moodle%/apache/bin/php.ini (where %moodle% is where you've installed moodle to.

HTH,

Peter.

In reply to chris johnson

Re: PHP LDAP module does not seem to be present

by Mike O'Connell -
Hey all,
         Let me start by saying that Im a complete newbie at moodle and LDAP (havent even heard of them before 2 weeks ago).
Anyway, Im getting the same problem as above
"Warning: The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled."
and if I then try to log on as one of the users I get
"
Fatal error: Call to undefined function: ldap_connect() in /var/www/moodle/auth/ldap/lib.php on line 1298" (i take it that error pops up because of the warning in red).

unlike the other people who replied on this thread I'm using Linux, so does anyone have a solution for this problem using Linux?

Thanks
Mike
In reply to Mike O'Connell

Re: PHP LDAP module does not seem to be present

by David Willington -
Morning Mike

I'm using Linux and have it working. It looks like php doesn't have ldap support, so the ldap_connect() function isn't available. You can find out if this is the case by looking at the output of phpinfo();. You can do this by putting the following script into your moodle directory and browsing to it

<?php
phpinfo();
?>

You should get a lot of useful information, including a section about ldap. If ldap support isn't enabled / installed you'll need to add it to php either by recompiling php or using your package manager.

Hope this helps

David
In reply to David Willington

Re: PHP LDAP module does not seem to be present

by Mike O'Connell -
by phpinfo(); do you mean the PHP info page in the admin part of moodle? That page does have a  file named "/etc/php4/apache2/php.ini" as a configuration file path. But nowhere on that page can I see any mention of LDAP.

So does that mean it isnt present?

Sorry if this is a stupid quesetion

thanks
Mike
In reply to Mike O'Connell

Re: PHP LDAP module does not seem to be present

by David Willington -
Yes that's the one. I'd not spotted it as part of moodle, but there shouldn't be any need to upload an additional script. On my test server it's at

http://moodle.local/admin/phpinfo.php

I've got a section called ldap with a table with 6 or so bits of information in. If you can't see ldap anywhere on that page, it's not installed, and you won't get any further until it is installed.

If you're compiling from source, you need (if I remember correctly) to use

./configure --with-ldap

at the configuration stage, but check this. Alternatively I think you might be able to get an rpm which will add ldap support if you're using Fedora. Try a google search

David
In reply to David Willington

Re: PHP LDAP module does not seem to be present

by Mike O'Connell -
I've got a section called ldap with a table with 6 or so bits of information in. If you can't see ldap anywhere on that page, it's not installed, and you won't get any further until it is installed.

Well this is the problem then. I'm going to have to talk with the guy who installed moodle on the machines, hopefully ill figure out how to set all this up.

Thanks again
Mike
In reply to Mike O'Connell

Re: PHP LDAP module does not seem to be present

by Mike O'Connell -
I dont know how to edit my previous post, so I'll just post again. Im using Ubuntu, so should I look for a different method or program to get the LDAP installed/working?
In reply to Mike O'Connell

Re: PHP LDAP module does not seem to be present

by David Willington -
I use Fedora which I'm pretty sure installs php with ldap support by default. I've never used Ubuntu/Debian, but I understand the forums are very good. I'd be inclined to try there to see how you can add ldap support to php. I've also compiled from source which often goes very smoothly. The trick always seems to be to give up if it doesn't and try a different version of the various bits of software. Alternatively look at the versions of Apache and php that are installed with Ubuntu and compile those with php support added

David
In reply to Mike O'Connell

Re: PHP LDAP module does not seem to be present

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If you are using Ubuntu, just install the 'php4-ldap' package and make sure it's activated in /etc/php4/apache2/php.ini once you install it (it should by default).

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: PHP LDAP module does not seem to be present

by Mike O'Connell -
Dude you are a lifesaver. I have spent the last two days looking a php code thinking I had to set up a module for this. After 30min searching I found out how to use php4-ldap.

"sudo apt-get install php4-ldap"
"sudo apache2ctl graceful"

I got it from here


Thanks again to everyone who gave help

Mike
 

In reply to Mike O'Connell

Re: PHP LDAP module does not seem to be present

by Mike O'Connell -
Great, now Im getting the error;

ldap_bind(): Unable to bind to server: Invalid credentials in /var/www/moodle/auth/ldap/lib.php on line 1308


edit;
The code around this line reads;

 if (!empty($binddn)){
            //bind with search-user
            //$debuginfo .= 'Using bind user'.$binddn.'and password:'.$bindpwd;
            $bindresult=ldap_bind($connresult, $binddn,$bindpwd);
        } else {
            //bind anonymously
            $bindresult=@ldap_bind($connresult);
        } 


So I guess its a problem with my bind settings

In reply to Mike O'Connell

Re: PHP LDAP module does not seem to be present

by Oliver Jackson -
Invalid credentials on line 1308 almost certainly means that your $binddn and $bindpwd are not a valid authentication pair.

I eventually got ldap authentication working with MS Active Directory with a ldap_bind_dn of the form
cn=<adminUserName>,ou=<adminGroup>,dc=myDomain,dc=qld,dc=edu,dc=au
and ldap_bind_pw is adminUsername's password of course.

The biggest hurdle i had to overcome was getting the ldap_host_url in the correct form.  The ldap auth setup page reccommends a proper URL format however I found that a simple server and port notation worked for me...
<msADServer>:389
Where port 389 is the default ldap port on a MS AD Server.
Also had to set the ldap version to 3.
In reply to Oliver Jackson

Re: PHP LDAP module does not seem to be present

by Mike O'Connell -
Wow, I got it working, thanks .



I had used administrator as a bind user before, but as I just noticed whoever set up the server did not give an openad logon name to him. So I gave him a name, then put that name and password into the bind_dn and bind_pw and it worked.

So was I supposed to use his password to bind?

edit; forgot to say how thankful I am, I spent ages on this LDAP thing. Its great to finally have it running.



In reply to chris johnson

Re: PHP LDAP module does not seem to be present

by John Hawkins -

I had the same problem as listed and performed all of the steps everyone had suggested, and was unsuccessful. However, I did fix the issue. The resolution is to edit the "php.ini" that is located in the apache\bin folder. I removed the comment from the extension=php_ldap.dll.

In reply to John Hawkins

Re: PHP LDAP module does not seem to be present

by thai trung -
I got the same problem: "The PHP LDAP module does not seem to be present..." on windows 2K SP4, MySQL 5.0.15, PHP 5.1.4. I copied php_ldap.dll to PHP folder "C:\php" ; ssleay32.dll and libeay32.dll to C:\winnt\system32 folder then thanks god it worked.
In reply to thai trung

Re: PHP LDAP module does not seem to be present

by Rob potts -

Hi

I am running php 4.4.4 and IIS 6 at the minute and keep getting the Warning about the LDAP module not being installed and Enabled does anyone have any idea how to get this working as just uncommenting the line seems to make no difference.

Thanks

Robert

In reply to Rob potts

Re: PHP LDAP module does not seem to be present

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If you have PHP installed as an ISAPI module, you need to restart IIS for the changes to take effect.

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: PHP LDAP module does not seem to be present

by Rob potts -

Got it working now but recive an error telleing me that on line 1213 of LDAP/lib.php there is an confermation error

In reply to Rob potts

Re: PHP LDAP module does not seem to be present

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I'd like to know a couple of things:

1.- What is the exact error message you get (I don't know what a confermation error is wink

2.- Which exact version of Moodle you are using (paste the contents of .../moodle/version.php here).

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: PHP LDAP module does not seem to be present

by Ian Scott -

I've setup a new install - did everything correctly - I know I did!! LDAP not present in PHP. Rechecked - same! In decided I'd try one last thing (this is a Windows 2003 IIS install) - instead of the location of the system variable at the end of the list (for the PHP folder) I put it at the begining (naturally a reboot) - worked! I hate windows at times.

PS added this try and stop the frustion of fellow windows 2003 installers

In reply to chris johnson

Re: PHP LDAP module does not seem to be present

by Anatol Bogun -
One more hint that might help someone: Make sure that there are no other older or broken libeay32.dll or ssleay32.dll files around. Always use the files that come with the binary download of your PHP version.

I tried endless combinations of copying .dll files to directories, setting up Windows PATH variables, changing the php.ini, I tried every hint I could find in thousands of forum threads, but I would always get this message in the php error log:

"PHP Warning: PHP Startup: Unable to load dynamic library '<PATH>php_ldap.dll' - The operating system cannot run %1. in Unknown on line 0"

Now what I was not aware of was that there were older versions of libeay32.dll and ssleay32.dll in the Apache binary directory (bin). These were probably loaded first and that messed everything up.

So if you have trouble it is probably worth checking your server for other libeay32.dll and ssleay32.dll . Maybe even another older php_ldap.dll somewhere else might cause the problem.

I hope this could save someone some time and frustration.

Good luck!
In reply to Anatol Bogun

Re: PHP LDAP module does not seem to be present

by Robert Saari -

This is an old thread, but someone may find this useful:

If you're running Moodle on a Windows box, change the extension_dir line in php.ini from

extension_dir = "./extensions"

to

extension_dir = ".\extensions"; "C:\php\extensions"

Then restart IIS.

This solved my problem.

In reply to Robert Saari

Re: PHP LDAP module does not seem to be present

by Michael Vaughan -

Folks I had the missing PHP  Ldap.  extention issue as well.  I am using Xampp.  I fixed this by simply uncommenting the php.ini file line item ldap.dll in the apache.bin.  Restarted Apache...and it worked.

-Michael

In reply to Michael Vaughan

Re: PHP LDAP module does not seem to be present

by Zbysiu Rodak -
I've installed 1.9 on Windows Server 2003 running Apache2Triad, and still have the problem at the beginning of the thread. Any help would be greatly appreciated.
In reply to Zbysiu Rodak

Re: PHP LDAP module does not seem to be present

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Have you tried any of the proposed solutions given in this same thread? If so, what results did you get?

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: PHP LDAP module does not seem to be present

by Zbysiu Rodak -
I tried the solution proposed in the reply above mine, but couldn't locate the files on the server. Several of the other solutions are for IIS and I don't know if they apply to a server running Apache.
In reply to Zbysiu Rodak

Re: PHP LDAP module does not seem to be present

by Zbysiu Rodak -
This is what eventually cracked it for me, from the post by Scott Hardwick, above -

"Configuration File (php.ini) Path C:\moodle\apache\bin\php.ini

Open and edit that file and remove the semicolon (;) in front of the line :
extension=php_ldap.dll"

However, my php.ini file was actually situated in C:\Windows\ which I found out by visiting the Server>PHP Info section of the Site Administration Menu, where I located it in the top PHP information table to the right.

And so far that seems to be it.

Thanks,

Zbysiu



In reply to chris johnson

Re: PHP LDAP module does not seem to be present

by Tim Beachy -

I know this is a really old thread...but I'm now on a new Moodle 2.0 installation using PHP5.3.5 on a hosted shared server environment, and am still getting this error.  I have LDAP enabled on the auth screen, but cannot see the settings as this error comes up.

It seems no one else on this thread uses shared hosting but it would appear from phpinfo.php that ldap is configured on my server:

'--with-ldap=shared'  (under the "Configure Command" section)

I've added "extension = php_ldap.dll" to my phprc (phpinfo) file, but it did not help.

Can anyone think of anything to help me with this?  Is the shared host the problem somehow?

Thanks for any help.

In reply to Tim Beachy

Re: PHP LDAP module does not seem to be present

by Rosario Carcò -

Very strange, I just installed a 2.03 Server and have nothing except eMail-selfregistration and manual. But I need LDAP and Shibboleth as I have on my production server 1.9.x

Rosario

In reply to chris johnson

Re: PHP LDAP module does not seem to be present

by Iacopo Sorce -

I know it's quite an old thread, but I stumbled upon the same problem recently. I found some hints here, but I wanted to point out my experience.

First off, I run moodle 2.0.3 on IIS 6. I installed PHP 5.3.6 with default settings and this caused my problem. In fact, even if I added the php_ldap.dll and edit the php.ini file, the LDAP module kept not being loaded.

I had to re-run the PHP 5.3.6 installer and change the installation, adding the support to LDAP (Extensions/LDAP). After that, all went fine.

I hope this can save someone's time ;)

Average of ratings: Useful (2)
In reply to Iacopo Sorce

Re: PHP LDAP module does not seem to be present

by Shreyas Kharat -

I did do the changes given by you on my server. The file php.ini(in production) is also uncommented on the line ;extension=php_ldap.dll to extension=php_ldap.dll but still it says to me PHP LDAP module does not seem to be present. Please can give me some hint on this error.

I am using Moodle version 2.1.2+ stable

With regards,

Shreyas Kharat

 

In reply to Shreyas Kharat

Re: PHP LDAP module does not seem to be present

by Rick Ruby -

You may also go to Control Panel in Windows Server 2008 R2, then Programs and Features, Click on the version of PHP you have installed, then click change. When the next window opens click IIS FastCGI, then in the window, "Choose Items to Install", click on extensions, and click on LDAP (which should have a red 'X' through it), click next, finish install and ldap should be installed.

In reply to Rick Ruby

Re: PHP LDAP module does not seem to be present

by Craig Gray -

Folks this has been a very helpful discussion, and I am hoping someone can help me with a similar LDAP problem.

I followed the various suggestions on this page and a previous instance of Moodle 1.9 on Windows 2003 (same server) had ldap working just fine.

I have the setup page for ldap, and php -m shows it is installed. All 3 dll's listed are in Windows\System 32 file, and the path shows as C:\Windows

When I put the settings in and attempt to authenticate I get an

error message in red stating

A required parameter (auth) was missing

The more information about this error points me to a generic moodle page with little info on it.

Key to understanding this is a previous install of 1.9 on this server was working just fine.  and the same settings are working on a production server albeit in Ubuntu Os.

 

Any help you can provide would be greatly appreciated.

 

In reply to Craig Gray

Re: PHP LDAP module does not seem to be present

by Craig Gray -

This is what is set in our system

ldap
LDAP Support enabled
RCS Version $Id$
Total Links 0/unlimited
API Version 3001
Vendor Name OpenLDAP
Vendor Version 20319
SASL Support Enabled

In reply to Craig Gray

Re: PHP LDAP module does not seem to be present

by Craig Gray -

The failure seems to be in the auth_config.php file, at least that is where it stops.  

In reply to chris johnson

Re: PHP LDAP module does not seem to be present

by Nishant Agrawal -

Hi ,

I  am new to moodle , I have installed Moodle 2.9 on Windows 2012R2 server and I am using WAMP server. I Install LDAP plugin(Attached image also) the installed worked well and then I went to switch authentication method to LDAP and got following message.

Warning: The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled.

I see php.ini file at following two paths.

1) C:\wamp\bin\php\php5.5.12

2) C:\wamp\bin\apache\apache2.4.9\bin

I uncommented extension=php_ldap.dll in both the php.ini  file.

I set path for php in environment variable as this C:\wamp\bin\php\php5.5.12;

Now when I do cmd php -m , I am able to see ldap over there.

And when I go to http://my/moodle/admin/phpinfo.php , I see ldap mentioned only as value of protocol attribute and no where else.

 I also kept 2 DLLs(php_ldap.dll  and ssleay32.dll) in C:\Windows\System32 path.

but I am still getting above warning.

Can someone please help me out in this.


Regards ,

Nishant

Attachment authentication.png
Attachment LDAP Plugin.JPG
In reply to Nishant Agrawal

Re: PHP LDAP module does not seem to be present

by Mariam SABIL -

Hi, I don't know if you found the solution but here is the one that worked for me, I did exactly what is said in this website: http://renegadetech.blogspot.com/2011/04/ldap-authentication-missing-on-windows.html and added the file php_ldap.dll to my System32 directory and it's fine now smile 

For any reason you couldn't get to the web site here is what is mentionned: 

  1. Verify that your php directory is included in your system path.  (You can check this by opening up a command window and running php -m.)  If you need help of fixing this, ask Google.
  2. Navigate to http://php.net/downloads.php and click on the link listed under Windows Binaries.  As of this writing, it is located here.
  3. Download the zip file relating to your installed version.  In my case 5.3 x86 Non Thread Safe.
  4. After the download completes, open the Zip file.  Locate and copy php_ldap.dll to your extension directory.  (You can find your extension directory by running http://{your site}/admin/phpinfo.php and locating the entry for extension_dir.)
  5. Open your php.ini file.  (You can find which php.ini file your system is using by locating the entry named Loaded Configuration File on the phpinfo page.)
  6. Look for a line that matches the following.  If it exists delete the semicolon.  Otherwise, create this entry without the semicolon.
    [PHP_LDAP]
;extension=php_ldap.dll
Now open up a command window and run the php -m command. If it runs successfully LDAP should be working. If not, it will reference dlls that are missing. In my case, I was missing  libsasl.dll.  Locate and copy libsasl.dll to the root of your php directory. (In my case C:\php.)Restart IIS, just for good measure.Navigate back to Advanced features > Plugins > Authentication >  LDAP Server and you should see the setup fields available to you.
Good luck smile