You are not logged in.

#1 2004-05-27 02:17:35

thedave
Member
Registered: 2004-04-03
Posts: 17

php modules: LDAP

Hi all,

Trying to run ldap and apache, and wanted to run phpLDAPadmin (http://phpldapadmin.sourceforge.net/.)  Unfortunately, phpLDAPadmin tells me that php was compiled without LDAP support...

So, I'm trying to figure out the appropriate solution.  Is it downloading php source and installing it myself?  Or is it just something I am missing in the php.ini file?

Thanks!

Dave


Dave

Offline

#2 2004-07-01 17:41:43

Aletheuo
Member
Registered: 2004-03-26
Posts: 59

Re: php modules: LDAP

There is now a great way to add compile options to packages such as php to add the (--with-ldap) ldap support, it's using srcpac.
You can install it via 'pacman -Sy srcpac' and there is a config file /etc/srcpac.conf, however I'm having trouble figuring out the syntax for adding the '--with-ldap' to the compile options and also the dependencies etc., if anybody has done this via srcpac please help out.

Thanks!
Craig


Arch Linux (Duke)
JabberID:  cgill27@jabber.org
IRC: Aletheuo
Registered Linux User #354975

Offline

#3 2004-07-02 04:10:12

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: php modules: LDAP

for one packages just edit the PKGBUILD and add --with-ldap (or whatever). for how to deal with building package and working withabs consult the docs.


AKA uknowme

I am not your friend

Offline

#4 2004-07-02 11:41:47

Aletheuo
Member
Registered: 2004-03-26
Posts: 59

Re: php modules: LDAP

Thats one way but you have to do the same procedure each time a new version of php was released right?
Thats why I mentioned srcpac.

Thanks,
Craig


Arch Linux (Duke)
JabberID:  cgill27@jabber.org
IRC: Aletheuo
Registered Linux User #354975

Offline

#5 2004-07-02 19:10:24

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: php modules: LDAP

Alright, I guess I'll have to explain it.  There are lots of other people who aren't stepping up even though I know they know how to use it.

srcpac uses sed to do a regular expression replace.  It replaces every instance of 'old' with 'new' (baring some specifics to regular expression replaces).

In the example, I add gtk-spell support to gaim.  The real important entry is the first one: '#./configure --prefix#./configure --with-gtkspell --prefix#'

If we look at the default gaim PKGBUILD it looks like this:

# $Id: PKGBUILD,v 1.52 2004/06/03 02:16:44 judd Exp $
# Maintainer: dorphell <dorphell@archlinux.org>
# Contributor: Lucien Immink <l.immink@student.fnt.hvu.nl>
pkgname=gaim
pkgver=0.78
pkgrel=1
pkgdesc="A GTK+-based messaging client"
url="http://gaim.sourceforge.net"
depends=('startup-notification' 'gtk2' 'libao' 'gnutls' 'tk')
source=(http://dl.sourceforge.net/sourceforge/gaim/gaim-$pkgver.tar.bz2)
md5sums=('079f3286333ed51cc72c65b5efe1b989')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr
  make || return 1
  make DESTDIR=$startdir/pkg install
  rm $startdir/pkg/usr/lib/perl5/*/$CARCH-linux-thread-multi/perllocal.pod
}

If we look for all lines that contain './configure --prefix' (the old), we find this one: ./configure --prefix=/usr

Then, looking at the rule, we replace './configure --prefix' with './configure --with-gtkspell --prefix' and it becomes this: ./configure --with-gtkspell --prefix=/usr

Now the option has been added.  You do something similar for php.  Remember that you can use 'srcpac -So' to just view your changes.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#6 2004-07-02 19:42:16

Aletheuo
Member
Registered: 2004-03-26
Posts: 59

Re: php modules: LDAP

So in this case, just adding the --with-ldap to get ldap support, would the srcpac.conf file look like the below?

conf_php=('#./configure#./configure --with-ldap#')

Is that all that is required or do you have to add all the compiler options that the php package is normally compiled with in the "old" and "new" section, just adding the --with-ldap to the new section?

Sorry if I'm not getting this, please be patient.
Thanks!
Craig


Arch Linux (Duke)
JabberID:  cgill27@jabber.org
IRC: Aletheuo
Registered Linux User #354975

Offline

#7 2004-07-02 20:29:40

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: php modules: LDAP

No, I didn't specify the entire ./configure line.  It replaces strings, regardless of what they actually mean.

The configure option you listed will work, the problem is that if you run srcpac multiple times you'll get ./configure --with-ldap --with-ldap, etc.  In my case, I put --with-gtkspell between two options, so it will only be added once no matter what.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#8 2004-07-02 21:19:18

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: php modules: LDAP

thedave wrote:

Trying to run ldap and apache, and wanted to run phpLDAPadmin (http://phpldapadmin.sourceforge.net/.)  Unfortunately, phpLDAPadmin tells me that php was compiled without LDAP support...

I've rebuilt Arch's php with LDAP support.

Offline

#9 2004-07-02 22:48:00

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: php modules: LDAP

i was going to suggest posting a feature but judd be me to it.


AKA uknowme

I am not your friend

Offline

Board footer

Powered by FluxBB