This forum is no longer active. Please post your questions to our new community site
Ldap with Wampstack
|
|
I’ve been trying to add Ldap to the wampstack. Ive edited the php.ini to remove the comment from the line Copied the ldap dll file from the ext folder into system32 folder AND into the php folder ( I found conflicting oppinions on where it should go, so i ended up testing both) Restarted apache. The phpinfo display doesnt show anything related to ldap, but I wasnt sure, so I added a php file with this code: <?php // Designate a few variables PING! ”;$ad = ldap_connect($host) or die( “Could not connect!” ); echo “ PING! ”;// Set version number ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3) or die (“Could not set ldap protocol”); // Binding to ldap server // Create the DN // Specify only those parameters we’re interested in displaying // Create the filter from the search parameters PING!! ”;$search = ldap_search($ad, $dn, $filter, $attrs) $entries = ldap_get_entries($ad, $search); PING!!! ”;if(($entries[“count”]>$zero)) Name: “.$entries[$i][”displayname"]0.“ } } else { No results found! ”;} ldap_unbind($ad); ?> I crashes whenever any function from ldap is invoked ( showing only the first ping message) , what am I doing wrong? I tried to post this before but I missposted on the wrong area. |
|
|
Hi, Could you try this example?
|
|
|
======== The website encountered an error while retrieving http://localhost/xbx6/testeld.php. It may be down for maintenance or configured incorrectly. Here are some suggestions: HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request. This happens when I test that code. |
|
|
Hi, We noticed that it is required that libeay32.dll and ssleay32.dll libraries are in the PATH http://php.net/manual/en/ldap.installation.php Copy and overwrite these libraries from php/ folder to apache2/bin folder and try to connect now. |
|
|
Overwrote the files on the Bin directory as per intructions, restarted apache. The same bevhaviour as observed so far persists. |
|
|
Sorry not sure what the problem is. |

