Problem compiling PHP

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Problem compiling PHP

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
R0d Longfella
Forum Newbie
Posts: 20
Joined: Fri Apr 08, 2005 7:17 am

Post 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
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply