我最近将我的 Windows 从 7 升级到 10。升级后,我通过将可执行路径添加到 PATH
环境变量来“安装”PHP7.1,相同的 php.ini
作为旧窗口(因为它是同一个文件夹,没有任何改变)并且还将相同的即时客户端 12 添加到 PATH
。
使用 php -v
,它加载所有模块,包括 mbstrings 和 xdebug,除了 oci 模块声明:
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\php_oci8_12c.dll' - The specified module could not be found. in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'ext\php_oci8_12c.dll' - The specified module could not be found. in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\php_pdo_oci.dll' - The specified module could not be found. in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'ext\php_pdo_oci.dll' - The specified module could not be found. in Unknown on line 0
PHP 7.1.1 (cli) (built: Jan 18 2017 18:38:49) ( ZTS MSVC14 (Visual C++ 2015) x64 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans
我还尝试安装一个新的 Windows,再次从 pecl 获取 oci,再次从 OTN 获取即时客户端。还没有一个工作。我安装了 MSVC14 可再发行组件。 Windows 是 64 位的,与 PHP 相同。
最佳答案
引用我自己的 comment , 作为 requested :
Your PHP is listed as x64 - make sure that the InstantClient is too. And if I remember correctly the InstantClient requires Microsoft Visual C++ 2010 Runtime to be installed (that'll also need to be x64).
关于php - OCI8 + PHP7.1 + Windows10 : The specified module could not be found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41919265/