Since Oracle is a proprietary package, most Linux distributions do not include the binary libraries needed to connect to it. Thus while you can use the package installer to install the necessary database agnostic generic drivers, you have to do additional work to get the actual database drivers to work. In this section, we will outline the steps needed to get the necessary parts installed for Oracle to work from both Perl and PHP5.
The first step to getting WACS to work with Oracle is to download
a suitable set of client side applications and libraries - these are
typically provided by Oracle 11i Instant Client
or a package of a similar name.
Generally doing a full install of instant client will provide all the
libraries you need.
The next step is to establish the necessary ORACLE_HOME
environment variables and check that the Oracle stack is running by
connecting to the server using the sqlplus client
provided as part of the instant client package.
It should then be a fairly simple matter of using cpan DBD::Oracle to download, compile and install the necessary database driver for Perl DBI. Once that's done, you just need to follow the installation instructions for Oracle in the appropriate chapters of this guide.
The conventional install of Php5's pear DB routines actually does
include the first line of support for Oracle in the form of the
oci8.php file in /usr/share/pear/DB
but this itself needs oci8.so which normally lives in
/usr/lib64/php/modules
. To make this module, you will
need the full set of SQL*Net libraries as provided by either a full database
installation or Oracle's instant client product. You
will also need the C compiler and the php-devel
package (this contains the command phpize so if trying
to invoke phpize gives Command not found
you almost certainly don't have the necessary development package installed.
Since WACS currently uses the now-obsolete Pear DB
module for database access, it appears to be a bit of a challenge to find
the correct source code. While we were preparing this document (May 2009),
the source code for the OCI8 driver could be found at the PECL web site. If you down
load this with something like wget and save it locally, running the
following (assuming you have ORACLE_HOME set correctly) as root produced a
successful install: pecl install oci8
. All that then
remains to be done is to configure the phpdbconnect string in the main
wacs configuration file with the correct database specification and things
should start to work.