Bug #58247 [Opn->Csd]: no support for oracle 11.x

From: Date: Thu, 14 Dec 2017 20:45:45 +0000
Subject: Bug #58247 [Opn->Csd]: no support for oracle 11.x
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213109@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=58247&edit=1 ID: 58247 Updated by: sixd@php.net Reported by: vincent dot mcintyre at atnf dot csiro dot au Summary: no support for oracle 11.x -Status: Open +Status: Closed Type: Bug -Package: PDO_OCI +Package: *General Issues Operating System: Debian 4.0 (etch) PHP Version: 5.2.0 -Assigned To: +Assigned To: sixd Block user comment: N Private report: N New Comment: This was fixed a long time ago. And to answer the last comment: get the source from http://php.net/downloads.php Previous Comments: ------------------------------------------------------------------------ [2012-01-11 22:27:57] chantivlad at yahoo dot fr Sorry my comment was incomplete before. You say: "Don't use PDO_OCI from PECL - it is much older than the PDO_OCI in the PHP releases." But what about if you are on a machine on which PHP was not built with PDO_OCI support and you can't reinstall PHP. Where do you find the right PDO_OCI source to install on top of the PHP installation? ------------------------------------------------------------------------ [2012-01-11 21:59:59] a at example dot com Don't use PDO_OCI from PECL - it is much older than the PDO_OCI in the PHP releases. ------------------------------------------------------------------------ [2011-12-05 17:12:04] chantivla at yahoo dot fr Well i tried with follwing config: - php 5.2.6 installed out of the box on SLES 11 (PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cli) (built: Feb 12 2010 15:26:33)) - installed oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm and oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm - installed oci8-1.4.6 - then i tried: sudo ln -s /usr/include/oracle/11.2/client64 /usr/include/oracle/11.2/client sudo ln -s /usr/lib/oracle/11.2/client64 /usr/lib/oracle/11.2/client sudo pear download http://pecl.php.net/get/pdo_oci cd /tmp/pear/download/PDO_OCI-1.0 sudo tar xvf PDO_OCI-1.0.tgz sudo phpize sudo ./configure --with-pdo-oci=shared,instantclient,/usr,11.2 and it would tell me checking Oracle OCI support for PDO... yes, shared checking Oracle Install-Dir... instantclient,/usr,11.2 :instantclient,/usr,11.2: checking if that is sane... yes checking for oci.h... /usr/lib/oracle/11.2/client/include configure: error: Unsupported Oracle version! 11.2 Changing config.m4 as suggested did not work for me. What worked was editing the configure script directly to make the same for 11.2 as for 10.2. Oh yes and hard code the path to php_pdo_driver.h that the script was not finding. Ugly but it worked. ------------------------------------------------------------------------ [2009-11-23 20:32:11] krbuck at mindspring dot com None of the solutions mentioned previously in this thread worked for me. What worked was to lie to the configure command and say that my Oracle version was 10.1. It compiled and worked with no problems. So, my configure command would be like this: ./configure --with-pdo_oci=instantclient,path_to_oracle_instant_client,10.1 even though the Oracle version I have is 11.1. I wish I had done this before I spent so much time trying to get it to work the proper way. Regards, Kenneth ------------------------------------------------------------------------ [2008-08-28 08:35:37] jess at zend dot com Actually, the extension compiles properly against OCI libs version 11.1 and also passes through all PHPTs successfully. The only modification I had to make was in config.m4, adding: <code> elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.11.1; then PDO_OCI_VERSION=11.1 </code> Between lines 9 and 10. And <code> 11.1) PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD) ;; </code> Between lines 121 and 122 of the same file. Apart from these config,m4 changes, no code change is required. A few additional notes maybe no one would care about: 0. Assuming all 10.x versions are supported and not only 10.1, config.m4 can be modified to this and make it easier to add additional versions: <code> SUPPORTED_VERS="1 8 9 10 11" AC_DEFUN([AC_PDO_OCI_VERSION],[ AC_MSG_CHECKING([Oracle version]) 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.a; then if test -f $PDO_OCI_DIR/lib/libcore4.a; then PDO_OCI_VERSION=8.x else PDO_OCI_VERSION=8.x fi else for OCI_VER in $SUPPORTED_VERS; do if test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.$OCI_VER.*; then PDO_OCI_VERSION="$OCI_VER.x" echo $PDO_OCI_VERSION fi done fi if [ -z "$PDO_OCI_VERSION" ] ;then { { echo "$as_me:$LINENO: error: Oracle-OCI needed libraries not found under $PDO_OCI_DIR" >&5 echo "$as_me: error: Oracle-OCI needed libraries not found under $PDO_OCI_DIR" >&2;} { (exit 1); exit 1; }; } fi </code> This way, you can easily add another version, say 12, to the SUPPORTED_VERS array. 1. Also, since the PHP_ADD_LIBRARY is quite the same with all versions but 8.0 [see case statement starting on line 102], lines 110-123 can be replaced with: <code> 9.x|10.x|11.x) PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD) ;; </code> Jess ------------------------------------------------------------------------ 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 https://bugs.php.net/bug.php?id=58247 -- Edit this bug report at https://bugs.php.net/bug.php?id=58247&edit=1

« previous php.bugs (#213109) next »