简体   繁体   中英

PHP 5.2 (win.server) can't connect to Oracle 12c db

I have difficult question. On win.server i have PHP 5.2 version. I must connect on Oracle 12c db. Procedure that i do is:

  1. download oracle client 12.2
  2. enable php_oci8.dll
  3. insert PATH to C:\\Windows\\SysWOW64\\instantclient_12_2
  4. restart server

also i tried to insert php_oci8_12c.dll extension and put oci8_12c.dll file in php/ext directory. When i true to run .bat file i see errors:

  • " Missing MSVCR120.ddl " - i resolve this with put this file in /php/ext dir.
  • "The procedure entry point gc_remove_zval_from_buffer could not be located in the dynamic link library php5ts.dll "

On my local pc i have php 5.6 and they work with 12c oracle. On internet see that 5.2 version can work with 12c.

What is the potencial problem? What I can try?

OCI 12c requires PHP 5.5 , see http://www.oracle.com/technetwork/articles/dsl/technote-php-instant-12c-2088811.html

You can try tho to install the Visual C++ Redistributable Package .

Because the MSVCR120.dll error can't be fixed by putting it in the ext folder.

When you use Apache and/or Console client, make sure you have enabled in both php.ini files, because they are different configurations.

You can also try the PECL OCI package from https://pecl.php.net/package/oci8

Make sure to pick the correct version, the most recent only works for PHP 7.

I finally managed to install it, with some miracle because i do like this much time...

Steps what i do is:

  • download instaclient12.2 (32bit)
  • install visual c++ redistributable 2013

  • put instaclient_12_2 in C:\\Windows\\SysWOW64\\

  • insert PATH C:\\Windows\\SysWOW64\\instantclient_12_2
  • download oci8_2.0.12 X64 TS and put php_oci8_12c.dll in php/ext
  • put oci.dll (from instantclient_12_2 (32bit)) in C:\\Apache24\\bin, C:\\php\\ext and C:\\php
  • enable extension php_oci8_12c.dll ini php.ini

On servers was Windows server 2008 R1 and PHP 5.6.2 TS

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM