Edit report at http://bugs.php.net/bug.php?id=39312&edit=1
ID: 39312
Updated by: [email protected]
Reported by: andrew dot nagy at villanova dot edu
Summary: Cannot install PDO_OCI
-Status: Assigned
+Status: Feedback
Type: Bug
Package: PDO related
Operating System: Linux
PHP Version: 5.2.9
Assigned To: sixd
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2010-03-16 20:54:32] jbrauer at llu dot edu
I got it to build on Redhat using the instantclient RPM. Here's what I
did.
manually added the following to config.m4 to allow for Oracle instant
client
11.1
(stolen from matts at iastate above)
@@ -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
AND
@@ -119,6 +126,9 @@
10.2)
PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
;;
+ 11.1)
+ dnl PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
+ ;;
*)
AC_MSG_ERROR(Unsupported Oracle version! $PDO_OCI_VERSION)
;;
if you have instant client of lower version its not needed.
Then I re phpize 'd it. and ran configure:
(esimard at mediagrif dot com)'s strace showed me the only dir I needed
was /usr
./configure --with-pdo-oci=instantclient,/usr,11.1.0.1
configure, make and make install completed successfully
------------------------------------------------------------------------
[2009-09-16 21:15:51] matts at iastate dot edu
Since the above messed up the formatting, I'll keep a copy of the patch
here for the meantime:
http://booster.agron.iastate.edu/mattsteven/oci_patch_jaunty.patch
------------------------------------------------------------------------
[2009-09-16 21:13:02] matts at iastate dot edu
Here is a patch which will let you build the pdo_oci lib with the
instant client on debian or ubuntu systems. Save the contents to
oci_patch.txt, and then run it against your config.m4 file like so:
cd PDO_OCI-1.0 && patch -p0 < /path/to/oci_patch.txt
=========
### 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
AC_MSG_ERROR([I'm too dumb to figure out where the include dir is
in your instant client install])
fi
-
PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib"
PDO_OCI_VERSION="`echo $PDO_OCI_IC_VERS | cut -d. -f1-2`"
else
if test -d "$PDO_OCI_DIR/rdbms/public"; then
@@ -119,6 +126,9 @@
10.2)
PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
;;
+ 11.1)
+ dnl PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
+ ;;
*)
AC_MSG_ERROR(Unsupported Oracle version! $PDO_OCI_VERSION)
;;
@@ -176,22 +186,24 @@
-L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD
])
- ifdef([PHP_CHECK_PDO_INCLUDES],
- [
- PHP_CHECK_PDO_INCLUDES
- ],[
- AC_MSG_CHECKING([for PDO includes])
- if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
+dnl ifdef([PHP_CHECK_PDO_INCLUDES],
+dnl [
+dnl PHP_CHECK_PDO_INCLUDES
+dnl ],[
+ AC_MSG_CHECKING([ PDO includes])
+ if test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
+ pdo_inc_path=$prefix/include/php/ext
+ elif test -f $prefix/include/php5/ext/pdo/php_pdo_driver.h; then
+ pdo_inc_path=$prefix/include/php5/ext
+ elif test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h;
then
pdo_inc_path=$abs_srcdir/ext
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
- elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
- pdo_inc_path=$prefix/include/php/ext
else
AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
fi
AC_MSG_RESULT($pdo_inc_path)
- ])
+dnl ])
PHP_NEW_EXTENSION(pdo_oci, pdo_oci.c oci_driver.c oci_statement.c,
$ext_shared,,-I$pdo_inc_path)
------------------------------------------------------------------------
[2009-09-04 23:09:55] jnichols959 at gmail dot com
seems like pdo_oci will configure, compile and run correctly with the
proper environment variables and configure commands everywhere *except*
on mac os x. the patch suggested in comment
http://bugs.php.net/bug.php?id=39312#c144683 of this bug fixes it on mac
os x (tested with 10.2.0.4 instantclient and os x 10.5.8) and also works
on linux (centos 5.3 x86_64 and 10.2.0.4 instantclient also x86_64).
can someone with access test and hopefully apply the patch so os x users
can use pdo_oci without hacking the configure script?
------------------------------------------------------------------------
[2009-07-14 14:36:16] cmroddy at gmail dot com
following tony2001's directions exactly i am of course able to
reproduce this problem. i got the thing to build once a couple of years
ago but haven't succeeded since then. as i recall it took several days
of continuous shell games with the configure script.
it seems there is no one around to maintain PDO_OCI. i can sympathize
with this. i certainly wouldn't want to maintain it either. but if this
build can't be made to work even given explicit paths to every single
file it needs, then PDO_OCI needs to be dropped entirely and deleted
from the documentation.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=39312
--
Edit this bug report at http://bugs.php.net/bug.php?id=39312&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.