Compiling PHP with LDAP Support help needed

roarkh

Verified User
Joined
Aug 30, 2005
Messages
141
Location
Bellingham, WA
I am setting up a brand new box running 64-bit CentOS 6 and am having all kinds of problems getting php to compile with ldap support. I have been able to achieve this before on an older 32-bit CentOS box with no problems.

I have installed the openldap and openldap-devel packages using yum and edited my /usr/local/directadmin/custombuild/custom/ap2/configure.php5 file adding the --with-ldap directive but when I issue the ./build php -n command I always get the following error. Without the --with-ldap directive php compiles fine.

Code:
checking for LDAP support... yes
checking for LDAP Cyrus SASL support... no
configure: error: Cannot find ldap libraries in /usr/lib.

*** There was an error while trying to configure php. Check the custom/ap2/configure.php5 file

I am a bit lost here at this point since I followed the same steps that worked flawlessly on my older CentOS box. Can anyone point me in the right direction what might be wrong?

Thanks.
 
Well, I was able to get this to work, but I don't know that the workaround I used is really the best way to go about this.

Basically I made some symlinks in /usr/lib to the ldap libraries in /usr/lib64

Code:
ln -s /usr/lib64/libldap.so /usr/lib/libldap.so
ln -s /usr/lib64/libldap_r.so /usr/lib/libldap_r.so

After that php built fine and ldap functions are working. If anyone has a "better" solution I'd be interested in hearing it.

Thanks.
 
Back
Top