Page 1 of 1
PHP and LDAP servers
Posted: April 22nd, 2008, 22:36
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?
Posted: April 22nd, 2008, 22:40
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
Posted: April 22nd, 2008, 22:44
by ProfHawking
Ah sorry yes i meant active directory, not exchange.
I have successfully got it to bind, but that is all
Posted: April 22nd, 2008, 22:47
by wyrd
can you get it working with another client?
(
http://www-unix.mcs.anl.gov/~gawor/ldap/ )
Posted: April 22nd, 2008, 22:58
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.
Posted: April 22nd, 2008, 23:12
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
Posted: April 22nd, 2008, 23:46
by ProfHawking
okies, not to worry. cheers dude.
I'll have to keep trying
Posted: April 23rd, 2008, 0:11
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?
Posted: April 23rd, 2008, 0:32
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
Posted: April 23rd, 2008, 4:05
by Dr. kitteny berk
Got any jam?
Posted: April 23rd, 2008, 7:56
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.
Posted: April 23rd, 2008, 8:42
by fabyak
You'd have to cover the whole thing just to be sure
Posted: April 23rd, 2008, 8:56
by Lateralus
Well that's part of the problem - when it comes to software, what do you cover?
Posted: April 23rd, 2008, 9:03
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?
Posted: April 23rd, 2008, 23:48
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.
Posted: April 24th, 2008, 1:36
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.
Posted: April 24th, 2008, 1:41
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.
Posted: April 24th, 2008, 4:48
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.