You have only have to install Oracle InstantClient.
Edit httpd.conf
and rebuild php
I had troubles too. so I took notes...
Please let me know if there are ommisions...
here:
http://athlone.homelinux.net/htdocs/...l#Installation
or here:
Basic Software Installation Summary
* Fedora 4
* instantclient_10_2 the .zip files
* apache 1.3.31
* php 5.1.1
Oracle 10g Instant Client (free download available from Technet) is the easiest way for PHP to connect to a remote Oracle database, requiring installation of only three libraries.
Rebuild apache to add PHP support.
cd apache_1.3.31
./configure --with-layout=GNU \
--enable-module=so \
--prefix=/usr/local/apache1.3.31
make
make install
Add to httpd.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Installing PHP-5.1.1 (not 5.1.6) with the OCI8 Extension
without using rpm's I used the .zip files
I did not apply a PHP patch for oci8 install
1. Download PHP-5.1.1 and unpack it.
2. Download the Basic and the SDK Instant Client packages from the Instant Client page on OTN.
3. Install the ZIP-Files as the root user into oinstall account.
# useradd -g oinstall -G dba orauser
# passwd orauser
Yes, I created an oinstall account. Previous client installs demanded it, and I don't want to mess around...
[root@bilbo instantclient_10_2]# pwd
/home/oinstall/instantclient_10_2
[root@bilbo ~]$ unzip instantclient-basic-linux32-10.2.0.2-20060331.zip
Archive: instantclient-basic-linux32-10.2.0.2-20060331.zip
inflating: instantclient_10_2/classes12.jar
inflating: instantclient_10_2/libclntsh.so.10.1
inflating: instantclient_10_2/libnnz10.so
inflating: instantclient_10_2/libocci.so.10.1
inflating: instantclient_10_2/libociei.so
inflating: instantclient_10_2/libocijdbc10.so
inflating: instantclient_10_2/ojdbc14.jar
[root@bilbo ~]$ unzip instantclient-sdk-linux32-10.2.0.2-20060331.zip
I had some errors first try and I remembered reading something about the sym links to the libs, so just to be safe...
[@bilbo ~]$ cd instantclient_10_2/
[oinstall@bilbo instantclient_10_2]$ ln -s libclntsh.so.10.1 libclntsh.so
[oinstall@bilbo instantclient_10_2]$ ln -s libocci.so.10.1 libocci.so
[oinstall@bilbo instantclient_10_2]$ ls -l
total 97592
-r--r--r-- 1 root root 1594191 Feb 5 2006 classes12.jar
lrwxrwxrwx 1 oinstall dba 17 Nov 9 17:12 libclntsh.so -> libclntsh.so.10.1
-rwxrwxr-x 1 root root 18774535 Feb 5 2006 libclntsh.so.10.1
-r-xr-xr-x 1 root root 5623929 Feb 5 2006 libnnz10.so
lrwxrwxrwx 1 oinstall dba 15 Nov 9 17:13 libocci.so -> libocci.so.10.1
-rwxrwxr-x 1 root root 1398088 Feb 5 2006 libocci.so.10.1
-rwxrwxr-x 1 root root 70690282 Feb 5 2006 libociei.so
-r-xr-xr-x 1 root root 119919 Feb 5 2006 libocijdbc10.so
-r--r--r-- 1 root root 1540457 Feb 5 2006 ojdbc14.jar
drwxrwxr-x 4 root root 4096 Feb 5 2006 sdk
4. Rebuild the configure script in the top-level PHP directory.
cd /usr/local/src/php-5.1.1
rm -rf config.cache
./buildconf --force
5. Rebuild PHP
[root@bilbo php-5.1.1]# ./configure
--with-oci8-instant-client=/home/oinstall/instantclient_10_2/ \
--prefix=/usr/local/php \
--with-apxs=/usr/local/apache1.3.31/sbin/apxs \
--enable-sigchild \
--with-config-file-path=/usr/local/apache1.3.31/etc
Generating files
updating cache ./config.cache
creating ./config.status
creating php5.spec
creating main/build-defs.h
creating scripts/phpize
creating scripts/man1/phpize.1
creating scripts/php-config
creating scripts/man1/php-config.1
creating sapi/cli/php.1
creating main/php_config.h
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.
[root@bilbo php-5.1.1]# make
-- stuff deleted ---
Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).
[root@bilbo php-5.1.1]# make install
Installing PHP SAPI module: apache
[activating module `php5' in /usr/local/apache1.3.31/etc/httpd.conf]
cp libs/libphp5.so /usr/local/apache1.3.31/libexec/libphp5.so
chmod 755 /usr/local/apache1.3.31/libexec/libphp5.so
cp /usr/local/apache1.3.31/etc/httpd.conf /usr/local/apache1.3.31/etc/httpd.conf.bak
cp /usr/local/apache1.3.31/etc/httpd.conf.new /usr/local/apache1.3.31/etc/httpd.conf
rm /usr/local/apache1.3.31/etc/httpd.conf.new
Installing PHP CLI binary: /usr/local/php/bin/
Installing PHP CLI man page: /usr/local/php/man/man1/
Installing build environment: /usr/local/php/lib/php/build/
Installing header files: /usr/local/php/include/php/
Installing helper programs: /usr/local/php/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/php/lib/php/
[PEAR] Archive_Tar - already installed: 1.3.1
[PEAR] Console_Getopt - already installed: 1.2
[PEAR] PEAR - already installed: 1.4.9
Wrote PEAR system config file at: /usr/local/php/etc/pear.conf
You may want to add: /usr/local/php/lib/php to your php.ini include_path
Installing PDO headers: /usr/local/php/include/php/ext/pdo/
When done edit php.ini (in apache conf - the location given by --with-config-file-path):
You may want to add: /usr/local/php/lib/php to your php.ini include_path
I did...
Restart Apache. I created a script...
#!/bin/sh
APACHEHOME=/usr/local/apache1.3.31
LD_LIBRARY_PATH=/home/oinstall/instantclient_10_2/
TNS_ADMIN=/home/oinstall/instantclient_10_2
export LD_LIBRARY_PATH TNS_ADMIN
echo "LD_LIBRARY_PATH : $LD_LIBRARY_PATH"
echo "TNS_ADMIN: $TNS_ADMIN"
echo Starting Apache
./apachectl start
That's it. Restart apache. Test PHP and look for oci8.