Dll in php “the specified module could not be found”

php5

I am having trouble with PHP extensions. I am trying to run a script and nothing happens then I checked my error log and here is what I got:

PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_oci8.dll' - The specified module could not be found. in Unknown on line 0

same goes for following files:

 php_oci8_11g.dll
 php_pdo_oci.dll
 php_sybase_ct.dll
 php_com_dotnet.dll

every file except php_com_dotnet.dll was installed with PHP installation, all the files are enabled in php.ini configuration. After researching online I saw some people said that it has to be copied to system32 or sysWOW64 folder, which I did without success. Then I tried to register them using regsvr32 in cmd and I am getting error for every single file:

"The module name_of_the_module.dll failed to load"

I don't understand what am I doing wrong.

Server configuration is Windows 2008 R2 64bit, IIS7, PHP 5.3.27

Best Answer

PHP cannot load a DLL file, if the file cannot be found OR the library has a dependency that cannot be found. If the file is in correct location, there are probably dependent libraries that cannot be loaded.

E.g. (for OCI8, from http://www.php.net/manual/en/oci8.requirements.php):

The OCI8 1.4 extension is included with PHP 5.3, PHP 5.4 and PHP 5.5. It is also available from » PECL. A newer OCI8 2.0 version is available only from » PECL. OCI8 1.4 requires Oracle 12c, 11g, 10g or 9iR2 client libraries and will install on PHP 4.3.9 onwards. OCI8 2.0 requires Oracle 12c, 11g or 10g client libraries and will install on PHP 5.2 onwards.

If the Oracle Database is on the same machine as PHP, the database software already contains the necessary libraries. When PHP is on a different machine, use the free » Oracle Instant Client libraries.

Related Topic