K
K
Ksyusha2016-04-21 19:06:16
linux
Ksyusha, 2016-04-21 19:06:16

Linux (Debian). How to install LDAP in PHP?

Tell me please. I saw the manuals, but everything is somehow compressed there (Are there any more detailed explanations?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Cheremisin, 2016-04-22
@Ksenia91

Actually, in a good way, you need to know your LDAP scheme, where and what lies. You may also need to initiate a TLS session. What is the ldap server itself? Microsoft AD or SLAPD?
Well, something like this for example (authorization):

$ldap = ldap_connect("ldap.example.com");
if ($bind = ldap_bind($ldap, $_POST['username'], $_POST['password'])) {
  // log them in!
} else {
  // error message
}

More extensively - https://samjlevy.com/php-login-script-using-ldap-v...

E
Ergil Osin, 2016-04-21
@Ernillew

apt-cache search php ldap
php5-ldap - LDAP module for
php5
well then
sudo apt-get install php5-ldap

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question