php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60901 Oracle-11.2 is not detected (too new)
Submitted: 2012-01-27 12:31 UTC Modified: 2012-10-22 06:27 UTC
From: lzsiga at freemail dot c3 dot hu Assigned: sixd (profile)
Status: Closed Package: OCI8 related
PHP Version: 5.3.9 OS: AIX 6.1
Private report: No CVE-ID: None
 [2012-01-27 12:31 UTC] lzsiga at freemail dot c3 dot hu
Description:
------------
$ ls $ORACLE_HOME/lib32/libclntsh.so.*.1

configure tries this and fails, beacuse the Oracle version is 11.2

$ ls $ORACLE_HOME/lib32/libclntsh.so.*.2
..../lib32/libclntsh.so.11.2



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-27 13:21 UTC] lzsiga at freemail dot c3 dot hu
Quick fix:

sed_repl 's:  if test -s "$OCI8_DIR/orainst/unix.rgs"; then:'\
'  if test -s "$OCI8_LCS_BASE.11.2"; then\n    OCI8_ORACLE_VERSION=11.2;\n'\
'  elif test -s "$OCI8_DIR/orainst/unix.rgs"; then:' configure
 [2012-01-27 20:47 UTC] sixd@php.net
-Status: Open +Status: Feedback
 [2012-01-27 20:47 UTC] sixd@php.net
Instead of patching the configuration script can you try creating a symbolic 
link from libclntsh.so and/or libclntsh.so.11.1 pointing to libclntsh.so.11.2?

For ORACLE_HOME installs on Linux (and likely on Solaris) a symbolic link from 
libclntsh.so to libclntsh.so.11.1 is automatically created during Oracle 
installation.

Linux & Solaris 11.2 Instant Client zip installs provide libclntsh.so.11.1 (for 
drop-in library replacement similar to how Oracle 10.2 libs were called *.10.1). 
Generic installation instructions for Instant Client are to manually create a 
symbolic link from libclntsh.so to libclntsh.so.11.1
 [2012-01-27 20:49 UTC] sixd@php.net
-Package: Compile Failure +Package: OCI8 related
 [2012-01-30 05:56 UTC] lzsiga at freemail dot c3 dot hu
It might work, but I wouldn't want to hack around in the Oracle's directory... could you please add an option to ./configure prevent the version-autodetecting? Something like: 

OCI8_VERSION=11.2 ./configure --with-oci8

or

export OCI8_VERSION="$(grep OCI_MAJOR_VERSION $ORACLE_HOME/rdbms/public/oci.h | cut -d' ' -f 4).$(grep OCI_MINOR_VERSION $ORACLE_HOME/rdbms/public/oci.h | cut -d' ' -f 4)"
./configure --with-oci8
 [2012-02-23 21:42 UTC] sixd@php.net
What created libclntsh.so.11.2?  The instantclient-basic-aix.ppc64-
11.2.0.3.0.zip 
and instantclient-basic-aix.ppc32-11.2.0.3.0.zip files only contain libclntsh.so

I don't consider creating a libcntsh.so.11.1 symlink such a hack, since creating 
the reverse symlink is required on other platforms.  See 
http://docs.oracle.com/cd/E11882_01/appdev.112/e10646/oci01int.htm#LNOCI16174
However I can improve the installation experience on AIX once I understand what 
the installed environment commonly looks like.
 [2012-02-23 21:46 UTC] sixd@php.net
-Assigned To: +Assigned To: sixd
 [2012-09-13 08:16 UTC] lzsiga at freemail dot c3 dot hu
A new aspect of this problem: an over-zealous version of 'tail' wouldn't accept syntax 'tail -1' only 'tail -n1'

(in this line in configure:
  OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -1`  # Oracle 10g, 11g etc
)
 [2012-09-14 07:18 UTC] sixd@php.net
Automatic comment on behalf of sixd
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bbf5978e2641d924c2d4d1c47210756943a28f7b
Log: Fixed bug #60901 (Improve "tail" syntax for AIX installation)
 [2012-09-14 07:18 UTC] sixd@php.net
-Status: Feedback +Status: Closed
 [2012-09-14 07:20 UTC] sixd@php.net
I merged the "tail" fix.  I'm closing this bug out.  I understand you'll need to 
create a symlink like other platforms.
 [2012-09-14 08:00 UTC] lzsiga at freemail dot c3 dot hu
Okay, thank you for your help.
 [2012-10-20 10:51 UTC] rainer dot jung at kippdata dot de
The tail "fix" breaks compilation on Solaris for php version 5.3.18, which worked until version 5.3.17.

Not all "tail" implementations support "-n1". On Solaris default "tail" only support "-1".

You could switch to using a variable TAIL and auto detect a working tail implementation (understanding "-n"), which on Solaris would be the non standard /usr/xpg4/bin/tail. Users could overwrite with a new --with-tail switch.
 [2012-10-22 01:29 UTC] sixd@php.net
-Status: Closed +Status: Re-Opened
 [2012-10-22 05:55 UTC] sixd@php.net
-Status: Re-Opened +Status: Closed
 [2012-10-22 05:55 UTC] sixd@php.net
Automatic comment on behalf of sixd
Revision: http://git.php.net/?p=php-src.git;a=commit;h=dbb72de6c75796803ed6ed103763a12eebc9e78e
Log: Re-fixed bug #60901 (Improve "tail" syntax for AIX installation)
 [2012-10-22 06:27 UTC] sixd@php.net
I re-fixed this and also pushed OCI8 1.4.9 with the fix to PECL.
 [2012-10-22 19:06 UTC] rainer dot jung at kippdata dot de
I couldn't find 1.4.9 but I agree with the patch by rading and understanding it and also applied the patch and tested it successful on Solaris and Linux. Thanks for your quick fix!
 [2012-10-23 07:28 UTC] rainer dot jung at kippdata dot de
Sorry "rading" meant "reading" (typo). 1.4.9 looks fine. Thanks again.
 [2014-10-07 23:21 UTC] stas@php.net
Automatic comment on behalf of sixd
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=dbb72de6c75796803ed6ed103763a12eebc9e78e
Log: Re-fixed bug #60901 (Improve "tail" syntax for AIX installation)
 [2014-10-07 23:22 UTC] stas@php.net
Automatic comment on behalf of sixd
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=bbf5978e2641d924c2d4d1c47210756943a28f7b
Log: Fixed bug #60901 (Improve "tail" syntax for AIX installation)
 [2014-10-07 23:32 UTC] stas@php.net
Automatic comment on behalf of sixd
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=dbb72de6c75796803ed6ed103763a12eebc9e78e
Log: Re-fixed bug #60901 (Improve "tail" syntax for AIX installation)
 [2014-10-07 23:33 UTC] stas@php.net
Automatic comment on behalf of sixd
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=bbf5978e2641d924c2d4d1c47210756943a28f7b
Log: Fixed bug #60901 (Improve "tail" syntax for AIX installation)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 05:01:29 2024 UTC