Solved Building php with ldap (CentOS7)

sce

Verified User
Joined
Aug 22, 2008
Messages
101
Location
EU
Hey guys,

I need some help. I'm trying to build PHP with LDAP support. My steps for now:

- I've added "--with-ldap \" and "--with-ldap-sasl \" in configure.php74 (and other versions) in /usr/local/directadmin/custombuild/configure/ap2
- .\build clean
- .\build php n

After some time I get this error:

/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_memfree'
/usr/lib64/liblber-2.4.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs....
/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_memfree'
/usr/lib64/liblber-2.4.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [sapi/fpm/php-fpm] Error 1

I also tried with installing openldap, openldap-clients. Nothing helps. Any ideas what else I can try?
 
Did you do this with the CustomBuild script ?
If not there is an option to install ldap in php extension setting of CB
 
  • Like
Reactions: sce
Omg how stupid of me... I've checked everywhere EXCEPT there. Thanks!

For future users:

- SSH to your server
- cd /usr/local/directadmin/custombuild
- ./build set_php ldap yes

Then go to Directadmin panel > Custombuild plugin > Build Software > Build ldap.
 
Back
Top