php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62003 LDAP compile failure
Submitted: 2012-05-11 10:42 UTC Modified: 2013-10-01 15:05 UTC
Votes:4
Avg. Score:4.5 ± 0.5
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:4 (100.0%)
From: aconnor at ait dot ie Assigned: mike (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.4.3 OS: Ubuntu server 12.04
Private report: No CVE-ID: None
 [2012-05-11 10:42 UTC] aconnor at ait dot ie
Description:
------------
I am trying configure php 5.4.3 from source on a ubuntu 12.04 server build using this switch --with-ldap=/usr i get this error:

configure: error: Cannot find ldap libraries in /usr/lib.

So i change to --with-ldap=/usr/lib
Then i get this error:

configure: error: Cannot find ldap.h

So i find ldap.h in /usr/include

I created a sym link for the /include directory in the /usr/lib directory, so the config might see ldap.h.

I have tried ln -s /usr/include/ /usr/lib and 
ln -s /usr/include/ldap.h /usr/lib/ but i still get the same error.


also:
Permissions on the directory /usr/lib: drwxr-xr-x 53 root root 4096 May 11 09:06 lib

I chmod 777 the ldap.h file.

Then ran ln -s /usr/include/ldap.h /usr/lib/ i also tried 
ln -s /usr/include/ldap.h .

Both create the link it appears as : lrwxrwxrwx 1 root root 19 May 11 09:00 ldap.h -> /usr/include/ldap.h

But still the same error


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-28 13:41 UTC] macolinovo at gmail dot com
I'm also with same problem
 [2012-12-05 14:15 UTC] fernando dot wendt at gmail dot com
When compiling PHP 5.4.9, trying to enable both oci8 (instantclient, 11.2) and 
ldap modules, it points the same issue, and fails. The little bit diff is that 
once you point --with-ldap, it seems to compile it, but - by a misunderstood 
behavior, it uses the ldap.h from instantclient sdk file! Of course, make fails.

Reading at OTN forum, theres is a thread where some people does not recommend 
compiling them togheter: the suggest is to compile PHP with ldap, and install 
oci8 with PECL, after [https://forums.oracle.com/forums/thread.jspa?
messageID=10319335]. 

Works to me: i was needing ldap at first. oci8, will be added after.

Best regards
 [2013-10-01 14:15 UTC] mike@php.net
-Status: Open +Status: Feedback
 [2013-10-01 14:15 UTC] mike@php.net
See bug #61450 -- a fix is in the works.
I'm inclined to mark this as duplicate.

@aconnor: Were you trying to build ldap and oci8 at the same time, too?
 [2013-10-01 14:33 UTC] aconnor at ait dot ie
-Status: Feedback +Status: Open
 [2013-10-01 14:33 UTC] aconnor at ait dot ie
Hi Mike,

At the time I wasn't trying to build with oci8 at the time.
I eventually got around this error after alot of trial and error I found then 
solution in a different version of ldap. I was trying to compile with openldap-
stable-20120311 (2.4.30), I downloaded and compiled openldap-2.4.31 and this 
allowed me to compile php 5.4.3. I now have multiple successful ldap connections 
running on the front end of our server.
Sorry I didn't post these comments earlier, I didn't realise others were having 
a similar issue.

This was my solution but it only be a work-around as there could be a bug. 

Regards,
Anthony
 [2013-10-01 15:05 UTC] mike@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: mike
 [2013-10-01 15:05 UTC] mike@php.net
Ok, we'll suppose it's fixed then.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC