我已经通过适当的Oracle Instantclient 12.1将PHP 5.6配置为支持php_oci8_12c.dll,包括必需的VC可再发行组件。当我在cmd.exe中检查扩展的PATH并尝试执行php-cgi.exe <\ dbtest.php,
时,此方法正常工作E:\PHP_56>php-cgi < E:\Inetpub2\testapp\dbtest.php
X-Powered-By: PHP/5.6.30
Content-type: text/html; charset=UTF-8
nice!!!
E:\PHP_56>
当使用FastCgi通过IIS应用程序请求dbtest.php时,此方法不起作用。在Windows事件日志中可以找到以下提示:
The following information was included with the event:
php[5852]
PHP Warning: PHP Startup: Unable to load dynamic library 'E:\PHP_56\ext\php_oci8_12c.dll' - The specified module could not be found.
("E:\PHP_56\php-cgi.exe")
唯一的区别可能是FastCgi不使用扩展的OS环境PATH变量,该变量在系统设置中进行管理,该变量包括第一个条目即InstantClient的路径。如何在IIS中将操作系统环境变量明确添加到FastCgi设置?