Bug 149873 - make PHP oci8 driver support Oracle Instant Client RPM
make PHP oci8 driver support Oracle Instant Client RPM
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: php (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
Depends On:
  Show dependency treegraph
Reported: 2005-02-28 10:37 EST by Kai Bolay
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-04-28 14:53:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
updated spec file (25.65 KB, text/plain)
2005-02-28 10:38 EST, Kai Bolay
no flags Details
patch for spec file (3.09 KB, patch)
2005-02-28 10:39 EST, Kai Bolay
no flags Details | Diff
Oracle's patch support instant client (6.90 KB, patch)
2005-02-28 10:41 EST, Kai Bolay
no flags Details | Diff

  None (edit)
Description Kai Bolay 2005-02-28 10:37:56 EST
Oracle now has an "Instant Client" RPM (see
which makes the installation of their client software much, much
easier. I modified the PHP spec file to support this. I used a patch
provided by Oracle
and updated it so it applies cleanly.

I think this is useful for many people and hope you can incorporate
these changes in future updates.
Comment 1 Kai Bolay 2005-02-28 10:38:54 EST
Created attachment 111477 [details]
updated spec file
Comment 2 Kai Bolay 2005-02-28 10:39:25 EST
Created attachment 111478 [details]
patch for spec file
Comment 3 Kai Bolay 2005-02-28 10:41:00 EST
Created attachment 111479 [details]
Oracle's patch support instant client

adapted from
Comment 4 Joe Orton 2005-02-28 10:54:59 EST
Thanks for the contribution.

It's not clear to me: is it necessary or desirable to support *both*
the different methods of building the OCI extension?  Or could the old
stuff be removed now?
Comment 5 Kai Bolay 2005-02-28 11:19:30 EST
I certainly prefer the RPM based "Instant Client" and according to
Oracle's FAQ
"The Instant Client interoperates with any database version that the
full Oracle Client interoperates with" and "Instant Client is FREE for
anyone to use in a development or production environment". "Instant
Client can be redistributed by ISVs to their customers in their custom
installations. Enterprises can redistribute Instant Client within
their organizations".

I just didn't want to close off non-instant client based installations
even though I see no benefit to them. If it were up to me I'd remove
the old stuff, but more conservative folks might want to stay with
their old installation method.

Also, I think "oracle_ic" should probably default to "1". Why not ship
this RPM by default?
Comment 6 Joe Orton 2005-03-02 12:50:30 EST
I think it makes sense to ship just this then; thanks.

To answer the last question: packages in the core distribution can
only depend on other packages in the core distribution.
Comment 7 Joe Orton 2005-03-03 10:45:17 EST
I've put a test source package here:


can you test this; does it work?  I took out "AutoReq: 0" as it
shouldn't be necessary.
Comment 8 Kai Bolay 2005-03-03 12:19:27 EST
Thanks! I've tried the test package
but it doesn't work:

- I get warnings about non-existing user jorton and group cambridge
- the configure option needs to be --with-oci8-instant-client=shared
(NOT: --with-oci8=shared)
- "AutoReq: 0" is neccessary because Oracle's RPM doesn't specify that
it provides libclntsh.so
Comment 9 Joe Orton 2005-03-03 12:25:06 EST
You can ignore the username warnings; I fixed the other two issues:
can you try this one out too?

Comment 10 Kai Bolay 2005-03-03 13:28:12 EST
I overlooked this:

- "Requires: oracle-instantclient-basic >= 10" was missing, too. This
is the Oracle RPM which provides the neccessary shared libraries

- The build fails (my attached patch replaces dword with dvoid, but
this is missing in your patch):

/usr/src/redhat/BUILD/php-4.3.2/ext/odbc/php_odbc.c:1251:1: warning:
"/*" within comment
/usr/src/redhat/BUILD/php-4.3.2/ext/oci8/oci8.c: In function
/usr/src/redhat/BUILD/php-4.3.2/ext/oci8/oci8.c:4809: `dword'
undeclared (first use in this function)
/usr/src/redhat/BUILD/php-4.3.2/ext/oci8/oci8.c:4809: (Each undeclared
identifier is reported only once
/usr/src/redhat/BUILD/php-4.3.2/ext/oci8/oci8.c:4809: for each
function it appears in.)
/usr/src/redhat/BUILD/php-4.3.2/ext/oci8/oci8.c:4809: syntax error
before ')' token

I suggest to download the four Oracle instantclient RPMs and
installing them (URL see above - they are free and installing them is
easy - nothing else required). So you can test this easily yourself.

  Thanks, Kai
Comment 11 Marius Andreiana 2005-04-12 07:09:49 EDT
Is there a way to pass the with_oci8 as true parameter to rpmbuild?
Now I manually edit php.spec and define it to 1.

Also, could a similar define be done for postgresql and mysql, enabled by default? 

Comment 12 Marius Andreiana 2005-04-18 04:47:07 EDT
I got an error on rpmbuild as I don't know how to pass _with_oci8 parameter and
I just changed in php.spec
%define with_oci8 1

But later in spec some places use %{with_oci8} (which is true) and other use
%{?_with_oci8:oci8} which is false.

This is the error:
RPM build errors:
    Could not open %files file /usr/src/redhat/BUILD/php-5.0.4/files.oci8: No
such file or directory
Comment 13 Joe Orton 2005-04-18 04:51:41 EDT
This is a RHEL3 bug, Marius, please ask questions about Fedora packages on
fedora-list@redhat.com, I'll answer them there.
Comment 14 Josh Bressers 2005-04-28 14:53:26 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.