IIS 8 - PHP Manager - Enabling php_oci8.dll to connect Oracle

I need to connect to Oracle DB in my PHP codes.

I am using Windows Server 2012, IIS 8 with PHP Manager and PHP version 5.5.11. I opened the PHP IIS manager, then switched to PHP extensions, then turned on the extension "php_oci8.dll".

extension=php_oci8.dll ;extension=php_oci8_11g.dll 

However, when I tried to connect to Oracle DB, I get the following PHP error:

 PHP Fatal error: Call to undefined function oci_connect() 

I just restarted IIS using IIS Manager, but did not restart the computer. Do I need to reboot?

Do I also need to download "instantclient-basic-windows.x64-12.1.0.1.0.zip"? I tried to extract it and put the directory in the environment variable "Path", but still does not work.

PHPInfo Configure Command:

 cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\x86\instantclient10\sdk,shared" "--with-oci8=C:\php-sdk\oracle\x86\instantclient10\sdk,shared" "--with-oci8-11g=C:\php-sdk\oracle\x86\instantclient11\sdk,shared" "--with-enchant=shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--disable-static-analyze" "--with-pgo" 

Thank you in advance.

+6
source share
2 answers

Try to copy

  • orannzsbbxx.dll
  • oci.dll
  • oraocieixx.dll

from instantclient-basic-windows.x64-xxx.zip to C: \ Windows \ SysWOW64. Then restart the IIS service and check phpinfo() .

You only need to enable php_oci8.dll .

The My Path environment variable contains only the PHP path, without instantclient.

It helps me.

0
source

You will find answers to your questions in the official link: http://www.oracle.com/technetwork/articles/dsl/technote-php-instant-084410.html

0
source

Source: https://habr.com/ru/post/974207/


All Articles