Forum Stats

  • 3,826,046 Users
  • 2,260,590 Discussions
  • 7,896,779 Comments

Discussions

PHP 5.4 compilation with PDO-OCI driver using Oracle Instant client 10.2.0.4

user4232673
user4232673 Member Posts: 2
edited Dec 4, 2013 3:36PM in PHP

Hi,

I have downloaded Instant client 10.2.0.4 basic and sdk zip files from Instant Client downloads for Mac OS X (Intel x86),

Extracted into a folder as shown below

[email protected] 1 MNV_Kishore  1000    278 Apr  1  2009 BASIC_README
[email protected] 1 MNV_Kishore  10001609607 Feb  2  2008 classes12.jar
[email protected] 1 MNV_Kishore  1000  34168 Apr  1  2009 genezi
lrwxr-xr-x  1 MNV_Kishore  wheel    20 Dec  2 18:10 libclntsh.dylib -> libclntsh.dylib.10.1

[email protected] 1 MNV_Kishore  1000   25582048 Mar 31  2009 libclntsh.dylib.10.1

[email protected] 1 MNV_Kishore  10002062528 Mar  3  2009 libnnz10.dylib
lrwxr-xr-x  1 MNV_Kishore  wheel    18 Dec  2 18:10 libocci.dylib -> libocci.dylib.10.1
[email protected] 1 MNV_Kishore  10001277896 Mar  3  2009 libocci.dylib.10.1

[email protected] 1 MNV_Kishore  1000   72626768 Apr  1  2009 libociei.dylib

[email protected] 1 MNV_Kishore  1000 118672 Mar 25  2009 libocijdbc10.dylib
[email protected] 1 MNV_Kishore  1000 118672 Mar 25  2009 libocijdbc10.jnilib
[email protected] 1 MNV_Kishore  10001555682 Feb  2  2008 ojdbc14.jar
[email protected] 7 MNV_Kishore  wheel   238 Apr  1  2009 sdk

All header files .h are present in include dir under sdk

When I tried to configure with command as

./configure --with-pdo-oci=instantclient,/usr/local/instantclient_10_2,10.2.0.4, below error is encountered

checking for oci.h... configure: error: I'm too dumb to figure out where the include dir is in your instant client install

Could any one please help me with this error

Appreciate the assistance..

Answers

  • Christopher Jones-Oracle
    Christopher Jones-Oracle Member Posts: 1,648 Employee

    What version of PHP are you using?  Why do you need Instant Client 10.2 instead of using the latest 11.2?

  • Hi,

    On reviewing the PDO-OCI config.m4 script, it does not seem to handle version 11.1.. Please correct me if I am wrong..

    if test -s "$PDO_OCI_DIR/orainst/unix.rgs"; then

        PDO_OCI_VERSION=`grep '"ocommon"' $PDO_OCI_DIR/orainst/unix.rgs | sed 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4`

        test -z "$PDO_OCI_VERSION" && PDO_OCI_VERSION=7.3

      elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then

        PDO_OCI_VERSION=10.1

      elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.9.0; then

        PDO_OCI_VERSION=9.0

      elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.8.0; then

        PDO_OCI_VERSION=8.1

      elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.1.0; then

        PDO_OCI_VERSION=8.0

      elif test -f $PDO_OCI_DIR/lib/libclntsh.a; then

        if test -f $PDO_OCI_DIR/lib/libcore4.a; then

          PDO_OCI_VERSION=8.0

        else

          PDO_OCI_VERSION=8.1

        fi

      else

        AC_MSG_ERROR(Oracle-OCI needed libraries not found under $PDO_OCI_DIR)

      fi

  • Christopher Jones-Oracle
    Christopher Jones-Oracle Member Posts: 1,648 Employee
    edited Dec 4, 2013 3:13PM

    Support for building with Oracle 11 was added to PDO_OCI in 2007.

    The current version of PHP 5.4's PDO_OCI config.m4 contains this:

    SUPPORTED_LIB_VERS="9.0 10.1 11.1 12.1"  # The lib vers are not bumped when the DB version is bumped
    AC_DEFUN([AC_PDO_OCI_VERSION],[
      AC_MSG_CHECKING([Oracle version])
      for OCI_VER in $SUPPORTED_LIB_VERS; do
        if test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.$OCI_VER; then
          PDO_OCI_VERSION="$OCI_VER"
        fi
      done
      if test -z "$PDO_OCI_VERSION"; then
        AC_MSG_ERROR([Oracle required OCI8 libraries not found under $PDO_OCI_DIR])
      fi
      AC_MSG_RESULT($PDO_OCI_VERSION)
    ])
    
  • Christopher Jones-Oracle
    Christopher Jones-Oracle Member Posts: 1,648 Employee

    A quick comment on why you don't want to use PDO_OCI:

    The OCI8 extension has features such as DRCP Connection Pooling, FAN

    support, statement caching, and support for end-to-end tracing (via

    client identifiers).  I've also just added Oracle DB 12c "Implicit

    Result Set" support to OCI8 2.0.  Also new are DTrace static probes.

    DTrace is a widely respected "always on" tracing facility which is

    available on platforms like Oracle Linux (see my recent blog posts).

    PDO_OCI does not have any of these features.

This discussion has been closed.