-3

Does PHP 5.4 supports oracle 12c. Or is there any way that we can connect to oracle 12c by using an older version of oracle?

phrogg
  • 888
  • 1
  • 13
  • 28
SSneha
  • 75
  • 10
  • People who are giving negative badges, could you please give a simple answer to my simple question. I have asked 3 questions in last 3 days. Everyone is suggesting some solutions but nothing is working out. So i just asked a simple question. it doesn't mean i have not done any research. I have gone through almost every question related to this question. – SSneha Aug 23 '18 at 13:00
  • This is the page on the Oracle website which details the requirements for 12c http://www.oracle.com/technetwork/articles/dsl/technote-php-instant-12c-2088811.html - Just needed Google – Fergal Andrews Aug 23 '18 at 13:09
  • [I believe you just need the latest Oracle instant client and it should work.](https://stackoverflow.com/questions/48673057/how-to-connect-from-php-to-oracle-db-12c) – MonkeyZeus Aug 23 '18 at 13:15
  • It is giving the same error (Call to undefined function oci_connect())even with latest version. I downloaded and tried instantclient-basic-nt-12.2.0.1.0.zip for 32 bit because i am working on 32 bit windows server 2003 R2 – SSneha Aug 23 '18 at 13:52
  • It sounds like you need to enable oci8 in your php.ini file – MonkeyZeus Aug 23 '18 at 14:26
  • yes i did that. I have also enabled extension_dir. Added correct PATH variable but no luck – SSneha Aug 23 '18 at 14:34
  • Possible duplicate of [oci8, php7 and Oracle 10.1 compatibility](https://stackoverflow.com/questions/50791815/oci8-php7-and-oracle-10-1-compatibility) – timclutton Aug 30 '18 at 13:27
  • My answer to dupe explicitly quotes: "OCI8 2.0 requires Oracle 12c, 11g or 10g client libraries and will install on PHP 5.2 onwards." – timclutton Aug 30 '18 at 13:29

1 Answers1

1

Try looking at this Question to see if it will help you. Be sure to read all of the answers, as you may have missed a critical step: Call to undefined function oci_connect()

Another thing to check - if you installed the latest client without installing the previous version, you should make sure that your system is utilizing the latest client by checking your PATH System Variable. An easy way to test would be opening a Command Prompt window and typing "tnsping [database]". If the "TNS Ping Utility for 64-bit Windows:" string has something other than the appropriate version, you will need to make sure that the reference to the latest client appears BEFORE the older client in your PATH system variable. For example, if your PATH system variable has references that look like this:

C:\Oracle\product\11.2.0\client_1\bin;C:\Oracle\product\12.1.0\client_1\bin;

You will need to change it so that it looks like this:

C:\Oracle\product\12.1.0\client_1\bin;C:\Oracle\product\11.2.0\client_1\bin;

So that the reference to the latest client appears BEFORE the reference to the older client. It's not enough to have them both in the PATH, they need to be in the correct order as well.

1991DBA
  • 805
  • 1
  • 9
  • 18