Reputation: 19571
I have Apache 2.4 and php installed on Windows Server 2012.
Im trying to load the php_ldap.dll
extension.
Here's what Ive done:
In php.ini
I set the following:
extension_dir = "C:\php\ext"
extension=php_ldap.dll
Then, I made sure the dll was available at that path, yep, it's there:
phpinfo
shows that I am editing the correct php.ini
and the extension_dir
is updated.
However, when I start Apache, php_ldap.dll
is not loaded.
The Apache logs show this warning:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_ldap.dll' - The specified module could not be found.\r\n in Unknown on line 0
How can I fix this?
Also, what's with the \\
? Why is it doubling the "\" and is that the problem?
Upvotes: 2
Views: 4985
Reputation: 446
Do not use backslash in the php.ini !
Always slash in the php.ini even on Windows system.
extension_dir = "C:/php/ext"
extension=php_ldap.dll
Upvotes: 0
Reputation: 30061
My best guess would be that a needed library is missing from your system. The php_ldap
extensions requires that both libeay32.dll
and ssleay32.dll
is installed on the system:
From the ldap installation manual:
Note: Note to Win32 Users
In order for this extension to work, there are DLL files that must be available to the Windows system PATH. For information on how to do this, see the FAQ entitled "How do I add my PHP directory to the PATH on Windows". Although copying DLL files from the PHP folder into the Windows system directory also works (because the system directory is by default in the system's PATH), this is not recommended. This extension requires the following files to be in the PATH: libeay32.dll and ssleay32.dll Versions before PHP 4.3.0 additionally require libsasl.dll.
Upvotes: 3