How to configure a PHP installation with the LDAP extension in Linux

How to configure a PHP installation with the LDAP extension in Linux

by Bogdan Djoric -
Number of replies: 5
Hello moodlers,

I've installed my moodle site on Linux (Ubuntu) server. I have PHP (Version 5.0.5-2ubuntu1.1). I want to authenticate the users fron a LDAP server. When I go to "Administration » Users » Authentication options" and set to "Use an LDAP server" I get a message "Warning: The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled."

I'm looking how to enable the PHP LDAP module (extension?) in my moodle installation and I cannot find a way to to that.

Can anybody help me? What should I do to enable the PHP LDAP module in Linux?

Thanks,
Bogdan
Average of ratings: -
In reply to Bogdan Djoric

Re: How to configure a PHP installation with the LDAP extension in Linux

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
First of all, you have to install the php-ldap package. In Debian it's called php5-ldap, so I guess the name should be the same or very similar in Ubuntu.

Then, make sure the extension is activated (have a look at /etc/php5/apache/php.ini).

Saludos. Iñaki.
Average of ratings: Useful (2)
In reply to Iñaki Arenaza

Re: How to configure a PHP installation with the LDAP extension in Linux

by Bogdan Djoric -
Thanks, Iñaki.

Saludos,
Bogdan
In reply to Iñaki Arenaza

Re: How to configure a PHP installation with the LDAP extension in Linux

by Sheryl Villaroman -

Hi Iñaki,

Thanks for your post, it's very helpful. smile

Sheryl Villaroman

 

In reply to Iñaki Arenaza

Re: How to configure a PHP installation with the LDAP extension in Linux

by Manuel Costales -

Iñaki, but if I've a dedicated server? a WHM VPS, and CPanel...

In reply to Manuel Costales

Re: How to configure a PHP installation with the LDAP extension in Linux

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've never used cPanel (much less with WHM VPS) so I don't know where the knobs are. But there should be a place where you can configure PHP modules. There will probably be a list of available modules that you can enable/disable.

If the LDAP module is not in the list, you should get in touch with your hosting support to see if they can fix it or you are in charge of doing it (it depends on your hosting contract).

Saludos. Iñaki.