Bug #56679 [Fbk->NoF]: PDO-OCI does not find headers from Instant Client ZIP install

From: Date: Sun, 16 May 2021 04:22:13 +0000
Subject: Bug #56679 [Fbk->NoF]: PDO-OCI does not find headers from Instant Client ZIP install
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-233847@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=56679&edit=1 ID: 56679 Updated by: php-bugs@lists.php.net Reported by: cjbj at hotmail dot com Summary: PDO-OCI does not find headers from Instant Client ZIP install -Status: Feedback +Status: No Feedback Type: Bug Package: PDO OCI Operating System: Max OSX, Linux PHP Version: 5_1 CVS-2005-11-28 Assigned To: cmb Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2021-05-03 11:35:08] cmb@php.net Is this still an issue with any of the actively supported PHP versions[1]? [1] <https://www.php.net/supported-versions.php> ------------------------------------------------------------------------ [2010-01-13 06:02:34] j dot kaluza at redcross-transfusion dot be I think this workaround should be inserted in the package if possible it's been old story already and it's not in the downloadable package yet. Some students i know are stuck with that problem. Actually the best solution would be a configure option that et the user specify where is the oracle headers such as --with-oci-headers='/path/to/instantclient/headers'. This kind of problem will occur everytime Oracle will change the directories structure :/ ------------------------------------------------------------------------ [2006-11-12 12:17:27] chuck at horde dot org Using PHP 5.2.0, also on MacOS, configure finishes successfully (it finds the libraries and headers), but it doesn't add the oracle includes to the -I paths for compilation, so compile bails out quickly not finding oci.h. The instantclient files are in /usr/local/oracle/instantclient, with the .h files in /usr/local/oracle/instantclient/sdk/include. (Even if I copy those files into an include directory that is checked the build fails, but that's because the oracle libs aren't universal and I have an intel mac, which is definitely not PHP's problem.) ------------------------------------------------------------------------ [2006-09-09 11:29:16] php-bugs at danslereseau dot com This patch doesn't completely fix building with pdo-oci on Mac OS X: checking for oci.h... ./instantclient10_1/sdk/include configure: error: I'm too dumb to figure out where the libraries are in your instant client install It does fix the problem with finding the oci.h file, but it then check for a libclntsh.so file, which is not included in the Mac OS X InstantClient ZIP file. The test -f should use "libclntsh.$SHLIB_SUFFIX_NAME", not "libclntsh.so". I also had to: ln -s libclntsh.dylib.10.1 libclntsh.dylib but I don't think that's related. Without this last symlink, I was getting this error: checking Oracle Instant Client version... configure: error: Link from ./instantclient10_1/libclntsh.dylib to libclntsh.dylib.10.1 not found Finally, after those two errors were fixed, I was getting: checking for oci.h... ./instantclient10_1/sdk/include configure: error: Unsupported Oracle version! It seems the configure scripts tries to use directory names to guess the version of Oracle when using InstantClient. For Mac OS X, it should try to guess it using the filename of libclntsh.$SHLIB_SUFFIX_NAME.10.1 Here's a patch tested with Mac OS X 10.4 and InstantClient 10.1 (ZIP files). *** ext/pdo_oci/config.m4.orig Wed Feb 15 21:03:13 2006 --- ext/pdo_oci/config.m4 Sat Sep 9 11:27:59 2006 *************** *** 96,111 **** else AC_MSG_ERROR([I'm too dumb to figure out where the include dir is in your instant client install]) fi ! if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib/libclntsh.so" ; then PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib" ! elif test -f "$PDO_OCI_IC_PREFIX/client/lib/libclntsh.so" ; then PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/client/lib" ! elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.so" ; then PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX" else AC_MSG_ERROR([I'm too dumb to figure out where the libraries are in your instant client install]) fi - PDO_OCI_VERSION="echo $PDO_OCI_IC_VERS | cut -d. -f1-2" else if test -d "$PDO_OCI_DIR/rdbms/public"; then PHP_ADD_INCLUDE($PDO_OCI_DIR/rdbms/public) --- 96,120 ---- else AC_MSG_ERROR([I'm too dumb to figure out where the include dir is in your instant client install]) fi ! PDO_OCI_VERSION="echo $PDO_OCI_IC_VERS | cut -d. -f1-2" ! if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib" ! elif test -f "$PDO_OCI_IC_PREFIX/client/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/client/lib" ! elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.$SHLIB_SUFFIX_NAME" ; then PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX" + if test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then + PDO_OCI_VERSION=10.1 + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.9.0; then + PDO_OCI_VERSION=9.0 + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.8.0; then + PDO_OCI_VERSION=8.1 + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.1.0; then + PDO_OCI_VERSION=8.0 + fi else AC_MSG_ERROR([I'm too dumb to figure out where the libraries are in your instant client install]) fi else if test -d "$PDO_OCI_DIR/rdbms/public"; then PHP_ADD_INCLUDE($PDO_OCI_DIR/rdbms/public) ------------------------------------------------------------------------ [2005-11-29 22:20:05] wez@php.net Fixed in CVS: http://viewcvs.php.net/viewcvs.cgi/php-src/ext/pdo_oci/config.m4.diff?r1=1.14.2.2&r2=1.14.2.3 ------------------------------------------------------------------------ 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=56679 -- Edit this bug report at https://bugs.php.net/bug.php?id=56679&edit=1

« previous php.bugs (#233847) next »