Unable to load dynamic library %PHPRC%\ext\php_ldap.dll

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
FijiSmithy
Forum Newbie
Posts: 2
Joined: Thu Nov 06, 2008 8:38 pm

Unable to load dynamic library %PHPRC%\ext\php_ldap.dll

Post by FijiSmithy »

My Env is as follows:
Windows Server 2003 Sp2
PHP 5.2.3
Apache 2.0.x

My LDAP test page is:

Code: Select all

 
<?php 
$ldapconn =ldap_connect("ldap.test.com", 389); 
if($ldapconn){ 
echo "Success "; 
} 
else{ 
echo "Fail"; 
} 
?> 
 
When I web browse to that file I get the following error:
Fatal error: Call to undefined function ldap_connect()

From command line I can execute that PHP file and get the following:
Success

I check the apache log file and I find
PHP Warning: PHP Startup: Unable to load dynamic library '%PHPRC%\\ext\\php_ldap.dll' - The operating system cannot run %1.\r\n in Unknown on line 0
I have copied the ssleay32.dll and libeay32.dll into the path.
I'm thinking that it is the Apache php5apache2.dll module that is failing but I don't know how to fix it.

Any ideas?
Post Reply