Page 1 of 1

Problem compiling PHP

Posted: Fri Apr 15, 2005 6:16 pm
by pickle
Hi everyone

I'm trying to compile PHP 4.3.3 on a Mandrake 9.1 server, and I keep getting an error. During the configure process, I always get the error "Cannot find ldap.h". I have installed the OpenLDAP rpm using "urpmi openldap", but that doesn't help. Do I need to do more than just pass a configure option of '--with-ldap'?

Thanks for any and all help.

Posted: Sat Apr 16, 2005 10:10 am
by R0d Longfella
Hi Picle,

You can specify the ldap libs using "--with-ldap=/path/to/ldap/libs", which usually is gonna be somewhere in "/usr/include/". Try to find it using "locate ldap.h".

If you can't find it, you probably need to install somekind of dev package, which could be called something like "openldap-dev". Since only the dev packages hold the libs and source. After that, be sure to use updatedb before you use locate.

Goodluck!

R0d

Posted: Mon Apr 18, 2005 9:54 am
by pickle
Hi,

Thanks for the help, I got it figured out. I had to download and compile the latest versions of BerkeyleyDB and OpenLDAP, then PHP would compile.

FYI: Before I did this, ldap.h didn't exist anywhere on the server - very frustrating!

Thanks again.