LDAP functions on WIN32 version of PHP 4.2.3

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bowhuntr
Forum Newbie
Posts: 6
Joined: Thu Feb 13, 2003 8:05 am

LDAP functions on WIN32 version of PHP 4.2.3

Post 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!
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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
bowhuntr
Forum Newbie
Posts: 6
Joined: Thu Feb 13, 2003 8:05 am

Post by bowhuntr »

Do I need to reinstall from the zip version or can I just grab the files from it that I need?
User avatar
BigE
Site Admin
Posts: 139
Joined: Fri Apr 19, 2002 9:49 am
Location: Missouri, USA
Contact:

Post by BigE »

You can probably just grab the files you need from the zipped version.
bowhuntr
Forum Newbie
Posts: 6
Joined: Thu Feb 13, 2003 8:05 am

Post 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!!
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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
bowhuntr
Forum Newbie
Posts: 6
Joined: Thu Feb 13, 2003 8:05 am

Post by bowhuntr »

Thanks, thats actually the one I used for the basis of my script but it does not work.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

does it produce any error message? Or can you alter the script so it prints a error message that gives a clue?
bowhuntr
Forum Newbie
Posts: 6
Joined: Thu Feb 13, 2003 8:05 am

Post 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?
Post Reply