http://www.everfall.com/paste/id.php?8sywp9eqf586
http://bugs.php.net/bug.php?id=39312
1. From http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html download instantclient-basic and instantclient-sdk for your system, e.g. "instantclient-basic-linux32-11.2.0.1.zip" and "instantclient-sdk-linux32-11.2.0.1.zip".
2. Unzip it into /opt/oracle/instantclient/, your have to get the follow structure:
ll /opt/oracle/instantclient/
drwxr-xr-x 3 root root 4096 2010-08-04 17:47 ./
drwxr-xr-x 3 root root 4096 2010-08-04 17:42 ../
-rwxrwxr-x 1 root root 21865 2009-08-14 08:15 adrci*
-rw-rw-r-- 1 root root 437 2009-08-14 08:15 BASIC_README
-rwxrwxr-x 1 root root 36999 2009-08-14 08:15 genezi*
lrwxrwxrwx 1 root root 17 2010-08-04 17:45 libclntsh.so -> libclntsh.so.11.1*
-rwxrwxr-x 1 root root 40088477 2009-08-14 08:15 libclntsh.so.11.1*
-r-xr-xr-x 1 root root 6986848 2009-08-14 08:15 libnnz11.so*
lrwxrwxrwx 1 root root 15 2010-08-04 17:47 libocci.so -> libocci.so.11.1*
-rwxrwxr-x 1 root root 1879549 2009-08-14 08:15 libocci.so.11.1*
-rwxrwxr-x 1 root root 89377610 2009-08-14 08:15 libociei.so*
-r-xr-xr-x 1 root root 152304 2009-08-14 08:15 libocijdbc11.so*
-r--r--r-- 1 root root 1996228 2009-08-14 08:15 ojdbc5.jar
-r--r--r-- 1 root root 2111220 2009-08-14 08:15 ojdbc6.jar
drwxrwxr-x 4 root root 4096 2009-08-14 08:15 sdk/
-rw-rw-r-- 1 root root 37807 2009-08-14 08:15 xstreams.jar
ll /opt/oracle/instantclient/sdk/
drwxrwxr-x 4 root root 4096 2009-08-14 08:15 ./
drwxr-xr-x 3 root root 4096 2010-08-04 17:47 ../
drwxrwxr-x 2 root root 4096 2009-08-14 08:15 demo/
drwxrwxr-x 2 root root 4096 2009-08-14 08:15 include/
-r-xr-xr-x 1 root root 869 2009-08-14 08:15 ott*
-rw-rw-r-- 1 root root 298388 2009-08-14 08:15 ottclasses.zip
-rw-rw-r-- 1 root root 433 2009-08-14 08:15 SDK_README
3. Note there are two symlink: libclntsh.so -> libclntsh.so.11.1 and libocci.so -> libocci.so.11.1
4. Download PDO_OCI
cd /tmp
pecl download pdo_oci
tar xvfz PDO_OCI-1.0.tgz
5. Create /tmp/PDO_OCI-1.0/patch.txt with follow content (without empty line at the end):
=========
### Eclipse Workspace Patch 1.0
#P pdo_oci
Index: config.m4
===================================================================
--- config.m4 (revision 141)
+++ config.m4 (working copy)
@@ -7,6 +7,8 @@
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.11.1; then
+ PDO_OCI_VERSION=11.1
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
@@ -57,14 +59,19 @@
AC_MSG_CHECKING([for oci.h])
if test -f $PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client/oci.h ; then
PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client)
+ PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib"
AC_MSG_RESULT($PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client)
elif test -f $PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include/oci.h ; then
PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include)
+ PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib"
AC_MSG_RESULT($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include)
+ elif test -f $PDO_OCI_IC_PREFIX/sdk/include/oci.h ; then
+ PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/sdk/include)
+ AC_MSG_RESULT($PDO_OCI_IC_PREFIX/sdk/include)
+ PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX"
else