Re: LDAP in php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, March 30, 2008 8:15 pm, pobox@xxxxxxxxxxxxx wrote:
> As LDAP can have SQL back-end (I saw an example with PostgreSQL) - is
> it
> a very wild idea to implement (a simple) LDAP server in php?
>
> We have all the address data already in PostgreSQL and a php
> application
> managing all of it.
>
> I am thinking of simple uses, such as providing LDAP address books to
> Thunderbird/Squirrelmail users.
>
> For instance, is it too wild to think of Apache/php listening on the
> LDAP port (or so), get the request, parse it, get the data from
> PostgreSQL and send it back to the LDAP client?

You probably wouldn't run it through Apache, but you probably COULD
run an LDAP server of sorts using http://php.net/sockets

Main problem is one of performance.

The reason most people choose LDAP in the first place is to get
blazing fast performance, because they NEED it.

PHP is probably not going to give you blazing fast performance
compared to an off-the-shelf LDAP server in C.

You may be able to leverage from the code in http://php.net/ldap to
move most of the heavy lifting into an extension, or perhaps you could
expand that extension to do so, and then you just have a simple PHP
wrapper to handle the sockets part.

That would help some, and possibly even come "close" to C performance,
since the socket open/close/traffic/bandwidth is probably the limiting
factor there, rather than a single PHP byte-code interpreted function
call...

This is all just my expectations.  Feel free to surprise me with
actual test results. :-)

ymmv

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux