Page 1 of 1

LDAP functions on WIN32 version of PHP 4.2.3

Posted: Thu Feb 13, 2003 8:05 am
by bowhuntr
Can someone help me get the ldap functions working on PHP 4.2.3 on a windows system. My install was from the windows 4.2.3 installer package. I uncommented the php_ldap.dll parameter in the php.ini and all I get when I try to use it is php_ldap.dll not found. The file is in fact NOT on my system. How can I get it?

I am trying to write a page to access AD so our operators can look up user ID's from banner pages to know who print jobs belong to.

Any and all help is appreciated!

Posted: Thu Feb 13, 2003 9:35 am
by volka
go to http://www.php.net/downloads.php and take the zip-distribution.
the win32-zip-package is still there and contains the extension dlls (that's why it is about 4 or 5 times the size of the installer-version ;) )
http://www.php.net/get/php-4.2.3-Win32. ... m/a/mirror

Posted: Thu Feb 13, 2003 9:43 am
by bowhuntr
Do I need to reinstall from the zip version or can I just grab the files from it that I need?

Posted: Thu Feb 13, 2003 11:09 am
by BigE
You can probably just grab the files you need from the zipped version.

Posted: Thu Feb 13, 2003 3:38 pm
by bowhuntr
Thanks everyone for the help. I have gotten the script working as far as connecting to my LDAP server, but I can't seem to get any hits on my searches. Can someone help me as far as what the ldap_search filter format should be for AD? I want to be able to search by user ID and optionally by last name.

TIA!!

Posted: Thu Feb 13, 2003 5:53 pm
by volka
there are some examples on the php LDAP online manual page
take a look at the user contributed note from jon dot caplinger at broadwing dot com

Posted: Fri Feb 14, 2003 1:15 am
by bowhuntr
Thanks, thats actually the one I used for the basis of my script but it does not work.

Posted: Fri Feb 14, 2003 1:21 am
by volka
does it produce any error message? Or can you alter the script so it prints a error message that gives a clue?

Posted: Tue Feb 18, 2003 10:40 am
by bowhuntr
I took off the @ from the scripts to see the errors and all I get is "The number of entries returned is 0" which is why I think something is wrong with the $filter statement. What I am trying to accomplish is to search using the samaccountname and return the users full name. Anyone have any ideas on how my filter should look to do that?