LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-31-2014, 12:28 AM   #1
said76
Member
 
Registered: Aug 2011
Posts: 113

Rep: Reputation: Disabled
configure PHP with LDAP server


Hi,

I believe I have posted the following question before last year but did not manage to get the solution to the problem.

I have installed PHP from the source on my Ubuntu Server 12.04.03, and it's working fine. Now, the problem I have is to make the PHP to work with LDAP server. I need the LDAP because I want to be able to run a global address book. The webmail I use, roundcube, keeps complaining that I need to support LDAP with my PHP.

So, I re-installed my PHP-5.5.10 with LDAP as follows:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/local/lib --with-zlib --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-ldap

With this, I got an error message "configure: error: Cannot find ldap libraries in /usr//usr/local/ssl/lib"

I then found that my ldap resides at /usr/lib/i386-linux-gnu/
libldap-2.4.so.2
libldap.a
libldap_r-2.4.so.2
libldap_r-2.4.so.2.8.1
libldap_r.a
libldap_r.so
libldap.so

Hence, I went to make a small change to my configuration:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/local/lib --with-zlib --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-ldap=/usr/lib/i386-linux-gnu/

This time, I run it and received a different error: "configure: error: Cannot find ldap.h"

I found that my ldap.h is located in /usr/include

I'm not sure if I have installed LDAP correctly. The way I installed LDAP server is via the command "aptitude install slapd ldap-utils"

I wonder if I have missed any crucial steps here. I tried to find the solution on the Internet but to no avail so far.

Any help or direction would be very much appreciated.

Thank you
 
Old 03-31-2014, 02:37 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,173

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
Hi,

You should also install libldap-2.4-2 and libldap2-dev if not already installed.
And I guess you need to specify /usr in the ./configure script options[
CODE]./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/local/lib --with-zlib --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-ldap=/usr[/CODE]
 
Old 04-01-2014, 07:49 PM   #3
said76
Member
 
Registered: Aug 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
Thank you for replying.

I believe they have been installed because if I run the below command, it said nothing to be installed.

$ aptitude install libldap-2.4-2 libldap2-dev
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

Also, I included "/usr" in the configuration script option as suggested, it still gives me the same error message
Code:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/local/lib --with-zlib --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-ldap=/usr
Output:
...
checking for LDAP support... yes
checking for LDAP Cyrus SASL support... no
configure: error: Cannot find ldap libraries in /usr//usr/local/ssl/lib.

Thank you
 
Old 04-02-2014, 12:46 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,173

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
Quote:
checking for LDAP support... yes
checking for LDAP Cyrus SASL support... no
configure: error: Cannot find ldap libraries in /usr//usr/local/ssl/lib.
Looks like a known php bug
There is a workaround at the last post, but it works for 64bit systems, so you have to change it accordingly to suit your 32bit arch.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how do i configure LDAP server on RHEL 6 nandu neerukonda Linux - Server 2 08-09-2012 05:26 PM
Ubuntu Hardy (php-ldap):Can't contact LDAP server eantoranz Programming 7 12-02-2008 06:40 PM
How to Configure LDAP server dharminders Linux - Networking 6 02-21-2006 07:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration