Reputation: 4675
My PHP is in the path c:\php on a Windows 2012 server I added c:\php to the PATH variable.
I added php_pdo_sqlsrv_56_ts.dll in c:\php\ext directory
I added following lines in c:\php\php.ini file:
extension_dir = "c:\php\ext"
extension=php_pdo_sqlsrv_56_ts.dll
But the following command gives me warning that it cannot find the module whereas it exists there:
php --ini
PHP Warning: PHP Startup: Unable to load dynamic library 'c:\php\ext\php_sqlsrv_56_ts.dll' - The specified module could not be found. in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'c:\php\ext\php_pdo_sqlsrv_56_ts.dll' - The specified module could not be found. in Unknown on line 0
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File: C:\php\php.ini
Upvotes: 0
Views: 1013
Reputation: 57378
This might be a Windows problem whereby a DLL is reported as "not existing" if itself requires another DLL that is not found. So for example:
php_someextusingssl.dll - the file exists
But php_someextusingssl.dll requires ssleay32.dll, and that is not found at run time. So the error you get is "Cannot load php_someextusingssl.dll: file not found". The file not being found is not php_someextusingssl.dll, it is ssleay32.dll.
How do you solve this problem: get hold of some utility such as DEPENDS.EXE, and open the misbehaving extension. It should display the extension and all the DLLs on which it depends. IF I am right, then one or more will be marked red as "missing". Those are the DLLs you need to make available.
UPDATE 1: chances are that the missing files are among those listed on Microsoft SQL Server Driver page.
UPDATE 2: I've downloaded a copy of the Microsoft driver. Yours depends on ODBC32.DLL, MSVCP110.DLL and MSVCR110.DLL. The latter two are part of the Microsoft Visual C++ 2010 SP1 Redistributable for x86, which you can find here. The first is part of the ODBC32 driver listed as per Update 1.
Upvotes: 2