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

走远了吗. 提交于 2019-12-12 10:43:58

问题


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


回答1:


On Windows, I solved these kind of problems by adding the path specified in 'extension_dir' (in php.ini) to the value of PATH system environment variable.




回答2:


Check your extension_dir in your php.ini, it has to point to the correct directory.

# X:/path/to/php.ini

# On Windows
extension_dir = "ext"


来源:https://stackoverflow.com/questions/19772356/dll-in-php-the-specified-module-could-not-be-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!