|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-06-24 02:19 UTC] vincent dot mcintyre at atnf dot csiro dot au
Description: ------------ Trying to build 1.0 against instantclient 11.1.0.1 fails at the configure stage (call to configure given in "reproduce code" section). Reproduce code: --------------- cd PDO_OCI-1.0; \ /usr/bin/phpize4; \ ./configure --with-php-config=/usr/bin/php-config4 \ --prefix=/usr --with-pdo-oci=instantclient,/usr,11.1.0.1 Expected result: ---------------- It would be nice to be able to build against 11.x. Actual result: -------------- Configure stage fails with this error message: ... checking for oci.h... /usr/include/oracle/11.1.0.1/client configure: error: Unsupported Oracle version! 11.1 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 20:00:02 2026 UTC |
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