PHP and LDAP servers

If you touch your software enough does it become hardware?

Moderator: Forum Moderators

Post Reply
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

PHP and LDAP servers

Post by ProfHawking »

I was wondering if anyone has some ideas how to get php to work with an LDAP server...
I've installed the ldap module, and with a bit of fiddling just about connected it to an exchange server, but it doesn't need to be exchange if its easier with something else. Anyway, it doesn't seem to be able to read any data and errors all over the place. Guides on the net seem rather scant on details.

I just need to be able to add & remove email addresses to the ldap server, thats it.
Anyone tried doing anything like that?
wyrd
Polar Bear
Polar Bear
Posts: 275
Joined: March 23rd, 2005, 0:21
Location: in the navy...
Contact:

Post by wyrd »

can exchange serve LDAP?

i know it can read from AD or LDAP but never come across it that way round


EDIT

google says LDAP and exchange share some ports and can fight

a real LDAP server or AD might be more fruitful


something to bear in mind with AD, it won't give any information out until you 'bind' with a valid username and password
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Post by ProfHawking »

Ah sorry yes i meant active directory, not exchange.

I have successfully got it to bind, but that is all :(
wyrd
Polar Bear
Polar Bear
Posts: 275
Joined: March 23rd, 2005, 0:21
Location: in the navy...
Contact:

Post by wyrd »

can you get it working with another client?

( http://www-unix.mcs.anl.gov/~gawor/ldap/ )
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Post by ProfHawking »

appears not, i get a list error there when i tried. but narf i know so little about ldap that that app is rather confusing.
wyrd
Polar Bear
Polar Bear
Posts: 275
Joined: March 23rd, 2005, 0:21
Location: in the navy...
Contact:

Post by wyrd »

hmmm

well, i've exhausted my LDAP expertise too, i'm afraid


i found wireshark/ethereal quite handy, it give you pretty good error messages
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Post by ProfHawking »

okies, not to worry. cheers dude.
I'll have to keep trying
Fear
Zombie
Zombie
Posts: 2032
Joined: August 6th, 2006, 21:45

Post by Fear »

Does this example work?

http://uk2.php.net/manual/en/ldap.examples.php

also, it might be worth checking the security log on the AD server, as it might want encryption or something?
cheeseandham
Shambler In Drag
Shambler In Drag
Posts: 780
Joined: March 16th, 2007, 20:22
Location: on the sofa
Contact:

Post by cheeseandham »

Afraid I can't help much either, I've used phpLDAPadmin: "LDAP browser to manage your LDAP server" - in the past with OpenLDAP , maybe check out the source code for phpLDAPadmin for inspiration (or just use it)

p.s. LDAP's a bitch with dn this and dc & cn that - then throw MS into the mix for AD support and well.... There's a reason I stay away from it as much as possible :)
Dr. kitteny berk
Morbo
Morbo
Posts: 19676
Joined: December 10th, 2004, 21:53
Contact:

Post by Dr. kitteny berk »

Got any jam?
Lateralus
Dr Zoidberg
Dr Zoidberg
Posts: 4217
Joined: May 15th, 2005, 15:20

Post by Lateralus »

Dr. kitteny berk wrote:Got any jam?
That was about to be my suggestion too, although I'm unsure as to how jam could be applied to software, and I'm not sure how you could discern where the eyes are either.
fabyak
Home-made Big Daddy
Home-made Big Daddy
Posts: 5681
Joined: October 14th, 2004, 14:02
Location: Oxford, England

Post by fabyak »

You'd have to cover the whole thing just to be sure
Lateralus
Dr Zoidberg
Dr Zoidberg
Posts: 4217
Joined: May 15th, 2005, 15:20

Post by Lateralus »

Well that's part of the problem - when it comes to software, what do you cover?
fabyak
Home-made Big Daddy
Home-made Big Daddy
Posts: 5681
Joined: October 14th, 2004, 14:02
Location: Oxford, England

Post by fabyak »

On a less 5punk and jam related note, what is it that you're trying to connect from? Is it a CMS or something?
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Post by ProfHawking »

its a web based management system i am writing to provide an interface to deal with some hardware spam filters.

Basically the spam firewalls need an ldap server to query, to ensure that email coming in only goes to genuine users.

My web app keeps an sql db of users details, sorts out payments etc and keeps a list of their registered domains & emails, which i want to push into (and pull from) an ldap server for the firewall to use.

i have found a vmware vmdk of openldap server & all its requirements.
Will try to get that up and running next, just to see if it is AD's quirkyness causing the issues.
buzzmong
Weighted Storage Cube
Weighted Storage Cube
Posts: 7167
Joined: February 26th, 2007, 17:26
Location: Middle England, nearish Cov

Post by buzzmong »

On a side note:

PHP is the devils language. Not to mention the function explaination library on php.net is extremely minimalistic.

/is doing a calender application for Uni which is using MySQL.

Thread derailment over, carry on.
Fear
Zombie
Zombie
Posts: 2032
Joined: August 6th, 2006, 21:45

Post by Fear »

buzzmong wrote:PHP is the devils language.
It became the de facto linux web server standard, fuck knows why, I think it's weak compared to many others personally.
FatherJack
Site Owner
Site Owner
Posts: 9597
Joined: May 16th, 2005, 15:31
Location: Coventry, UK
Contact:

Post by FatherJack »

Microsoft's implementation of LDAP is quirky at best, I'd start with a Unix LDAP server and Softerra's LDAP browser to check I had the parameters right, then progress from there.
Post Reply