Re: LDAP in php

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

 



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

Yes... this starts to sound as a solution...

Sorry, I hope I do not sound lazy, I just need a bit of a help to locate the starting point.

I thought that there could be some way of php to listen to a port and accept the LDAP request.

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.

I am 100% aware of the fact that LDAP is a read optimized database (though I am not sure where this optimization goes when back end is PostgreSQL, for example - the LDAP "commands" seem simple and re-writing them into SQL can't be so much overhead; the explanation might be that PostgreSQL powered LDAP is not as fast as... - whatever, I'm not an expert and this analysis is not my goal, not now.).

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

100% aware of that.

As we have this php/PostgreSQL application and intercepting LDAP requests seems easy (though I do not know how to do it yet :) - I'm tempted to write a small funny LDAP thing in php, which can power Thunderbird address book (which, I think, can only read LDAP anyway, when e-mail is composed).

And if all works fine and promising (and may be slow) - I can evaluate the effort to plug a real LDAP into the whole system.

So php is just for prototyping and the result is curious, anyway.

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...

I'm not sure I understand well. Do you mean that I could use some of the C code in http://php.net/ldap ... I am afraid this is beyond what I can.

But I'll play with the socket thing and see what php gets and how I can re-write it internally and return, and how fast it is, and I'll drop a line back.

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

I'll try :) Thanks for the extensive ideas :) - was encouraging indeed.

Iv

--
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