PHP LDAP module does not seem to be present

Re: PHP LDAP module does not seem to be present

by Nishant Agrawal -
Number of replies: 1

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