php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39888 PHP 4.4.4 does not compile with Oracle OCI8 instant client
Submitted: 2006-12-19 15:12 UTC Modified: 2007-01-12 11:37 UTC
Votes:5
Avg. Score:4.2 ± 0.7
Reproduced:4 of 4 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (50.0%)
From: Martin dot Schnoy at hydro dot com Assigned:
Status: Wont fix Package: OCI8 related
PHP Version: 4.4.4 OS: AIX 5.3 ML05
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Martin dot Schnoy at hydro dot com
New email:
PHP Version: OS:

 

 [2006-12-19 15:12 UTC] Martin dot Schnoy at hydro dot com
Description:
------------
Configure reqests the shared OCI library libclntsh.so. The Oracle instant client for AIX (10.1 as well as 10.2) is shipped with libclntsh.a which is supposed to be a shared library(according to Oracle support).

I opened a SR at Oracle because I expect them to ship libclntsh.so. 

Oracle asked to report a bug at PHP also. They say PHP should link libclntsh.a on AIX.

Oracle Reference: SR number 6037776.993 

Reproduce code:
---------------
configure --with-apxs2=/usr/local/apache2/bin/apxs --disable-cli --without-mysql --with-oci8-instant-client=/usr/local/instantclient10_1

Expected result:
----------------
Configure running successfully

Actual result:
--------------
...
checking for Oracle (OCI8) support using ORACLE_HOME installation... no
checking for Oracle (OCI8) support using Oracle Instant Client... yes
checking Oracle Instant Client directory... /usr/local/instantclient10_1
checking Oracle Instant Client SDK header directory... /usr/local/instantclient1
0_1/sdk/include
checking Oracle Instant Client version... configure: error: Oracle Instant Clien
t library version not supported

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-19 15:15 UTC] tony2001@php.net
Use OCI8 from PECL.
 [2006-12-19 15:35 UTC] Martin dot Schnoy at hydro dot com
Soory, I posted a wrong Orcale SR number. The correct one is 6032016.994
 [2006-12-19 18:14 UTC] sixd@php.net
Background information: Originally all AIX shared libraries had .a extensions.  Recently AIX supports both .a and .so extensions to mean shared.
 [2006-12-21 08:55 UTC] Martin dot Schnoy at hydro dot com
Will try OCI8 from PECL. Due to holidays I will probably not find the time until Jan. 15.
 [2007-01-11 10:10 UTC] Martin dot Schnoy at hydro dot com
I replaced the oci8 extension that was shipped with PHP 4.4.4 by the latest version from PECL, ran buildconf --force and called configure with parameter --with-oci8=instantclient,/usr/local/instantclient10_1. The result was the same as with the originally shipped oci8:

checking for Oracle (OCI8) support... yes
checking Oracle Instant Client directory... /usr/local/instantclient10_1
checking Oracle Instant Client SDK header directory... /usr/local/instantclient1
0_1/sdk/include
checking Oracle Instant Client version... configure: error: Oracle Instant Clien
t library version not supported

Configure failes because it does not find /usr/local/instantclient10_1/libclntsh.so.10.1
 [2007-01-11 10:20 UTC] tony2001@php.net
>Configure failes because it does not find
>/usr/local/instantclient10_1/libclntsh.so.10.1

ln -s /usr/local/instantclient10_1/libclntsh.so /usr/local/instantclient10_1/libclntsh.so.10.1
 [2007-01-11 10:31 UTC] Martin dot Schnoy at hydro dot com
There is no /usr/local/instantclient10_1/libclntsh.so, only a /usr/local/instantclient10_1/libclntsh.a. Orcale does not ship libclntsh.so with instant client for AIX.
 [2007-01-11 10:53 UTC] tony2001@php.net
Then create both .so and .so.10.1 as symlinks to .a.

 [2007-01-11 11:08 UTC] Martin dot Schnoy at hydro dot com
I tried that already last December. Here is an extract of my posting to Orcale SR 6032016.994:

I linked libclntsh.a as libclntsh.so and 
libclntsh.so.10.1 and compiled PHP 4.4.4. There were no errors at compile time. 
However, there was an error when Apache 2 tried to load the PHP module:

httpd: Syntax error on line 53 of /usr/local/apache2/conf/httpd.conf: 
Cannot load /usr/local/apache2/modules/libphp4.so into server: 

rtld: 0712-001 Symbol OCIInitialize was referenced from module 

/usr/local/apache2/modules/libphp4.so
(), but a runtime definition of the symbol was not found.

nrtld: 0712-001 Symbol OCIEnvInit was referenced from module 
/usr/local/apache2/modules/libphp4.so(),
but a runtime definition of the symbol was not found.

rtld: 0712-001 Symbol OCIHandleAlloc was referenced from module 
/usr/local/apache2/modules/libphp4.so(),
but a runtime definition of the symbol was not found.

rtld: 0712-001 Symbol OCIErrorGet was referenced from module 
/usr/local/apache2/modules/libphp4.so(),
but a runtime definition of the symbol was not found.

rtld: 0712-001 Symbol OCIHandleFree was referenced from module 
/usr/local/apache2/modules/libphp4.so(),
but a runtime definition of the symbol was not found.

rtld: 0712-001 Symbol OCITransRollback was referenced from module 
/usr/local/apache2/modules/libphp4.so(),
but a runtime definition of the symbol was not found.

rtld: 0712-001 Symbol OCIDescriptorFree was referenced from module 

/usr/local/apache2/modules/libphp4.so(), but a runtime definition of the symbol 
was not found.

0509-021 Additional errors occurred but are not reported.

This is because libclntsh.a is in fact no shared library. It is a static 
library that can not be used as a shared library.
 [2007-01-11 11:15 UTC] tony2001@php.net
Works just fine on AIX, Solaris and other weird OSes using the way I've described. Fix your linker or ask Oracle to provide dynamic libraries instead.
 [2007-01-12 11:37 UTC] Martin dot Schnoy at hydro dot com
Oracle accepted this issue as bug #5722859 and will distribute the .so in further releases.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Nov 28 12:05:52 2022 UTC