Forum Stats

  • 3,838,691 Users
  • 2,262,394 Discussions
  • 7,900,734 Comments

Discussions

Make PDO_OCI support ORACLE client v12.2

f9f613dd-25e2-4215-a9a4-915d13754bff
edited Jun 21, 2017 2:14AM in PHP

compile php-5.6.30 First!

source:php-5.6.30\ext\pdo_oci

1) Edit File:config.m4

from:

PDO_OCI_IC_PREFIX="`echo $PDO_OCI_DIR | cut -d, -f2`"

PDO_OCI_IC_VERS="`echo $PDO_OCI_DIR | cut -d, -f3`"

   

to:

PDO_OCI_IC_PREFIX="`echo $PDO_OCI_DIR | cut -d, -f1`"

PDO_OCI_IC_VERS="`echo $PDO_OCI_DIR | cut -d, -f2`"

from:

  if test "$PHP_PDO_OCI" = "yes" || test -z "$PHP_PDO_OCI"; then

   

PDO_OCI_DIR=$ORACLE_HOME

  else

    PDO_OCI_DIR=$PHP_PDO_OCI

  Fi

to:

  if test "$PHP_PDO_OCI" = "yes" || test -z "$PHP_PDO_OCI"; then

    PDO_OCI_DIR=$PHP_PDO_OCI

  else

    PDO_OCI_DIR=$ORACLE_HOME

  Fi

from:

  case $PDO_OCI_VERSION in

    9.0|10.1|10.2|11.1|11.2|12.1)

to:

  case $PDO_OCI_VERSION in

    9.0|10.1|10.2|11.1|11.2|12.1|12.2)

2、compile

set ORACLE_HOME= /usr/lib/oracle/12.2/client64

cd php-5.6.30\ext\pdo_oci

      /usr/local/php/bin/phpize

     ./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-oci=shared,instantclient ,12.2

       make

       make install

Answers

This discussion has been closed.