Home   My Faqts   Contributors   About   Help   Link to FAQTS  

faqts : Computers : Databases : Oracle : Linux Specific

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

15 of 16 people (94%) answered Yes
Recently 10 of 10 people (100%) answered Yes

Entry

Making a PHP deb package with support for oci8

Nov 16th, 2003 07:23
Morten Bern,


This is a way to install PHP with support for oracle. 

My english is not corret, and for that i'm sorry.

First of all you need to have the oracle client installed. You can find
more information on doing that here: http://tldp.org/

My oracle home is /opt/oracle

Then get the source files for the packaget. Make sure that you have an
entry like this i your /etc/apt/sources.list

deb-src ftp://mirrors.sunsite.dk/mirrors/debian/ stable main non-free
contrib

If you don't have it add it. The remember to run:

apt-get update

To do the following you don't have to be root. 
Go to the directory where you want to compile the package and type:

apt-get source php4

This will download the package. The go to the source directory.

cd ./php4-4.X.X

edit the file ./debian/rules so that it has these lines

Line 21:
CFLAGS = -O2 -Wall -fsigned-char -L/opt/oracle/lib -R/opt/oracle/lib

Where /opt/oracle is the home of Oracle.

And add 
--with-oci8=/opt/oracle \
--with-oracle=/opt/oracle \ 

to the COMMON_CONFIG= on line 29.

Then do the following in the directory php4-4.X.X

dpkg-buildpackage -rfakeroot -uc -b

This will make all the deb packages.

Do 
cd ..
and the as root do:
dpkg -i php4_4.X.X-X_i386.deb

The restart apache and you are up and running.