Stettin Posted February 25, 2009 Report Share Posted February 25, 2009 I copied this file (php_ldap.dll) into /php/extensions and uncommented "extension=php_ldap.dll" in the php.ini For some reason the function still is not found. Is there anything else I need to do to enable this function? Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted February 25, 2009 Report Share Posted February 25, 2009 If you did this while the server was running, shut it down and restart the server. Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
Stettin Posted February 25, 2009 Author Report Share Posted February 25, 2009 If you did this while the server was running, shut it down and restart the server. I did that I tried running phpinfo() to see if it was loading, but all I saw was: extension_dir /usr/local/PHP/extensions /usr/local/PHP/extensions I grabbed the file from the php.net windows zip file in /ext Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted February 25, 2009 Report Share Posted February 25, 2009 Ok, you also have to make sure that the extension was grabbed form the same version of PHP as on 4.0. After that make sure theserver is shut down. Copy the extension to /user/local/php/extensions/ under the UniServer directory. Make the php.ini modifications. Start the server... Let me know. Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
Ric Posted February 25, 2009 Report Share Posted February 25, 2009 I have just checked this out on a clean install of Mona Enabled line (576) in UniServer\udrive\usr\local\php\php.ini as shown (removed the semi-colon):extension=php_ldap.dll Ran the servers! I was surprised, they did not fall over, just get a warning in Apache’s log file. Copied the following file: php-5.2.8-Win32\ext\php_ldap.dll To folder: UniServer\udrive\usr\local\php\extensions Restarted the servers, from Apanel selected phpinfo()About halfway down the page you will see a section for ldap, this confirms it is enabled. Does not guarantee that it is working. I have no access to a ldap server hence use an on-line service using this code: <?php $conn = ldap_connect("root.openldap.org","389") or die("Could not connect to server"); // specify LDAP server ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3); $r = ldap_bind($conn) or die("Could not bind to server"); // bind to the LDAP server specified above $result = ldap_search($conn,"dc=openldap,dc=org", "(cn=*)") or die ("Error in search query"); ldap_close($conn); print "No errors displayed connection was OK"; ?> Save it as test.php in folder: UniServer\udrive\wwwRestart the servers and type: http://localhost/test.php into your browser. All you should see is the line: No errors displayed connection was OK Any errors then it failed. All the bestRic Quote Link to comment Share on other sites More sharing options...
Stettin Posted February 26, 2009 Author Report Share Posted February 26, 2009 I have just checked this out on a clean install of Mona Enabled line (576) in UniServer\udrive\usr\local\php\php.ini as shown (removed the semi-colon):extension=php_ldap.dll Ran the servers! I was surprised, they did not fall over, just get a warning in Apache’s log file. Copied the following file: php-5.2.8-Win32\ext\php_ldap.dll To folder: UniServer\udrive\usr\local\php\extensions Restarted the servers, from Apanel selected phpinfo()About halfway down the page you will see a section for ldap, this confirms it is enabled. Does not guarantee that it is working. I have no access to a ldap server hence use an on-line service using this code: <?php $conn = ldap_connect("root.openldap.org","389") or die("Could not connect to server"); // specify LDAP server ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3); $r = ldap_bind($conn) or die("Could not bind to server"); // bind to the LDAP server specified above $result = ldap_search($conn,"dc=openldap,dc=org", "(cn=*)") or die ("Error in search query"); ldap_close($conn); print "No errors displayed connection was OK"; ?> Save it as test.php in folder: UniServer\udrive\wwwRestart the servers and type: http://localhost/test.php into your browser. All you should see is the line: No errors displayed connection was OK Any errors then it failed. All the bestRic "Restarted the servers, from Apanel selected phpinfo()About halfway down the page you will see a section for ldap, this confirms it is enabled." It does not show up in phpinfo()... Not sure why. I think I'm just going to use my windows share workaround and copy my stuff over to the linux box manually after I rebuild my sites. Thanks for the help though. Fatal error: Call to undefined function ldap_connect() in Y:\www\test.php on line 2 Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted February 26, 2009 Report Share Posted February 26, 2009 Do you have another copy of PHP somewhere? Search your PC for php.ini, maybe its pulling up another config file. Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
jdk Posted September 8, 2009 Report Share Posted September 8, 2009 I have just checked this out on a clean install of Mona Enabled line (576) in UniServer\udrive\usr\local\php\php.ini as shown (removed the semi-colon):extension=php_ldap.dll Ran the servers! I was surprised, they did not fall over, just get a warning in Apache’s log file. Copied the following file: php-5.2.8-Win32\ext\php_ldap.dll To folder: UniServer\udrive\usr\local\php\extensions Restarted the servers, from Apanel selected phpinfo()About halfway down the page you will see a section for ldap, this confirms it is enabled. Does not guarantee that it is working. I have no access to a ldap server hence use an on-line service using this code: <?php $conn = ldap_connect("root.openldap.org","389") or die("Could not connect to server"); // specify LDAP server ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3); $r = ldap_bind($conn) or die("Could not bind to server"); // bind to the LDAP server specified above $result = ldap_search($conn,"dc=openldap,dc=org", "(cn=*)") or die ("Error in search query"); ldap_close($conn); print "No errors displayed connection was OK"; ?> Save it as test.php in folder: UniServer\udrive\wwwRestart the servers and type: http://localhost/test.php into your browser. All you should see is the line: No errors displayed connection was OK Any errors then it failed. All the bestRic Hi,I am running US 3.5. I have added the correct.dll file, uncommented in php.ini, but when I run the above script, I receive the Failed to bind message. I can see LDAP in phpinfo. How can I troubleshoot this?Many thanks,Jeff Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.