How to install PHP-LDAP?

Codemeister

Verified User
Joined
Dec 17, 2013
Messages
6
So I have been trying pretty much everything and I'm sure I am forgetting something, but I don't know what.

I am trying to install PHP-LDAP but can't make it work.
Followed https://help.directadmin.com/item.php?id=252 for instructions.

First of all: I do not know what lines I need to add,
Code:
--with-ldap
, or something else?
Second: do I need to download any files, and if yes, from where? Do I need to install any files using apt-get?

I tried adding
Code:
--with-ldap
to the configure.php56-file and then did a
Code:
./build php n

I'm quite stuck and it's probably a real easy solution :confused:
 
Hello,

Under configure/ you can find:

Code:
ap2/             - for mod_php
fastcgi/         - for PHP as fascgi
fpm/             - for PHP as FPM
suphp/           - for suPHP

folders, you need to copy the needed to custom/

Then change the configure.phpXX files.

where XX replicates your PHP version number without dots:

- configure.php53
- configure.php54
- configure.php55
- configure.php56
- configure.php70
- configure.php71
- configure.php72
- configure.php73

Then run ./build php and make sure the commend ended with success. If a compilation failed, then you need to resolve reported errors and try again.

If you did everything correct

Code:
php -i | grep ^Configure

should show --with-ldap in Configure top line.

So check the mentioned things and try again.
 
Thanks for your reply.
I have followed the instructions but no luck.

I have tried;

Code:
--with-ldap
Code:
--with-ldap=/usr
Code:
--with-ldap=/usr/local/lib
Code:
--with-ldap=/usr/local
Code:
--with-ldap=/usr/lib

Every option results in the following error:
Code:
configure: error: Cannot find ldap.h
*** There was an error while trying to configure php. Check the configure file

Overview of the installed packages:

Code:
root@web:~# dpkg -l '*ldap*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                  Version                         Architecture                    Description
+++-=====================================================-===============================-===============================-===============================================================================================================
un  ldap-client                                           <none>                          <none>                          (no description available)
ii  ldap-utils                                            2.4.44+dfsg-5+deb9u2            amd64                           OpenLDAP utilities
un  libldap-2.3-0                                         <none>                          <none>                          (no description available)
ii  libldap-2.4-2:amd64                                   2.4.44+dfsg-5+deb9u2            amd64                           OpenLDAP libraries
ii  libldap-common                                        2.4.44+dfsg-5+deb9u2            all                             OpenLDAP common files for libraries
un  libldap2                                              <none>                          <none>                          (no description available)
un  libnet-ldap-perl                                      <none>                          <none>                          (no description available)
un  libsasl2-modules-ldap                                 <none>                          <none>                          (no description available)
un  openldap-utils                                        <none>                          <none>                          (no description available)
un  openldapd                                             <none>                          <none>                          (no description available)
un  sudo-ldap                                             <none>                          <none>                          (no description available)
un  umich-ldap-utils                                      <none>                          <none>                          (no description available)
 
Back
Top