Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42648 - PHP 4.3.x is not supporting Oracle 10g
Summary: PHP 4.3.x is not supporting Oracle 10g
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-23 13:16 UTC by Rene Androsch
Modified: 2004-03-28 15:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Small patch to get Oracle 10g working in PHP 4.3.4 (oracle10g_enable.diff,2.15 KB, patch)
2004-02-26 08:40 UTC, Rene Androsch
Details | Diff
My modified ebuild script (mod_php-4.3.4-r4.ebuild,5.41 KB, text/plain)
2004-02-26 08:41 UTC, Rene Androsch
Details
The diff against my new Oracle 10g enabled configure (configure.diff.gz,293.01 KB, application/x-gzip)
2004-02-29 09:09 UTC, Rene Androsch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Androsch 2004-02-23 13:16:28 UTC
The problem is at least in the make file of PHP. It only checks for 7.3, 8.0, 8.1 (8i) and 9.0 (9i). It looks at a file in $ORACLE_HOME that has a numeric value in it.
In Oracle 10g, this value is 10. I changed the php make file to also recognice the 10, but this alone was not enough to make it find the OCI libraries :(

Workaround for now: Install Oracle 9i OCI, then connect to server. I just don't like this, since I'm running Apache2 + PHP on the same Oracle server.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Rene Androsch 2004-02-25 11:00:43 UTC
I found in the bugtracker of php these two fixes:

http://bugs.php.net/bug.php?id=27117
http://bugs.php.net/bug.php?id=27093

They have been fixed in php 4.3.x-dev on the 1st and 3rd of February.

Any changes for an ebuild or a patch?
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-02-25 12:29:08 UTC
if you'd care to bundle up the patches and test to confirm that they solve the problem for you, then post the bundled patch here, and we'll include it.
Comment 3 Rene Androsch 2004-02-25 12:44:38 UTC
I'm already on it :)
There are about 15 lines to be changed in a config file and 5 lines in one c file.

Once I have it compiled and did some testing, I will post the patch for it.

BTW: It seems that the upcoming 4.3.5 will already have this in it :)
Comment 4 Rene Androsch 2004-02-26 08:40:55 UTC
Created attachment 26403 [details, diff]
Small patch to get Oracle 10g working in PHP 4.3.4
Comment 5 Rene Androsch 2004-02-26 08:41:19 UTC
Created attachment 26404 [details]
My modified ebuild script
Comment 6 Rene Androsch 2004-02-26 08:45:18 UTC
Here are the micro patch to get Oracle 10g connections correctly working (dword -> dvoid changes) and the updated config.m4 file, to correctly detect Oracle 10g.


In the ebuild file, I just added these lines:
---start---
	# to enable Oracle 10g OCI8 detection
	epatch ${FILESDIR}/oracle10g_enable.diff

	# needs updated configure
	rm configure
	./buildconf --force
---end---

The only ugly thing is: I had to delete "configure" and rebuilt it, otherwise the detection for Oracle 10g wouldn't be in it.


I also tested it and it worked!
(Connection to database, parsing of query, execution of statement, 4 rows retrieved, statement freed, connection closed).

From my point of view: it works.

To night, I will write a small test to check, if stored procedures work or not.
Comment 7 Tal Peer (RETIRED) gentoo-dev 2004-02-26 08:52:44 UTC
As a matter of fact, instead of hacking the config.m4 file and rerunning buildconf, you could just patch the configure script itself. Buildconf is a rather expensive process, and i'd rather avoid it in the ebuild.
Comment 8 Rene Androsch 2004-02-26 12:23:30 UTC
That is true, and that is really the only ugly downside of the patch :) I didn't know how important the configure file is and weither or not it was modifed to fit gentoo specific aspects.
I will try to get a good patch against the configure file and submit it here.

PS: oci8.c needs to be patched anyway.
Comment 9 Rene Androsch 2004-02-26 13:03:10 UTC
I now made a backup of the configure that comes with the ebuild.
Then I deleted it and run "./buildconf --force"

The I generated a "smaller" diff be running "diff -du configure.orig configure.new"
The resulting diff is 3.1 MB !! Maybe the configure in gentoo was built different!

Or should I attach the 3.1 MB file? (When gzip`d it is only 294 kb)
Comment 10 Tal Peer (RETIRED) gentoo-dev 2004-02-29 08:18:51 UTC
Could you please attach it (or put it somewhere online). I believe that most of it is due to whitespace changes or similiar.
Comment 11 Tal Peer (RETIRED) gentoo-dev 2004-02-29 09:00:13 UTC
Might also be because buildonf reorders things in the configure script (and then we'll just need to edit the configure script manually to get a smaller patch).
Comment 12 Rene Androsch 2004-02-29 09:09:18 UTC
Created attachment 26601 [details]
The diff against my new Oracle 10g enabled configure
Comment 13 Rene Androsch 2004-02-29 09:17:54 UTC
I attached the diff. (I got by rebuilding configure)

I hope PHP 4.3.5 is released soon, that there is not need for the patch anymore since it will be included as well as many other updates :)
Comment 14 Stuart Herbert (RETIRED) gentoo-dev 2004-03-28 15:05:23 UTC
This has been fixed in php-4.3.5.  Closing bug.  (I know that we don't have a php-4.3.5 ebuild yet)

Best regards,
Stu