A. Use PHP RPMs packages
1. Install Apache if not installed
2. Download Oracle Client Software -- if you are using GUI
or download Oracle InstantClient BasicLite (the rpm version) -- I choose this and install it.
to get latest version download it from http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html
my copy of Oracle Instant Client BasicLite is here
3. Install PHP and makesure you installed php-oci8 module, other modules you can install it if you like
I am not using CentOS version because it's not provide oci8 module. But I am using PHP from Miracle Linux - Asianux which also look-like Redhat derivatives distro. They provide complete PHP module including oci8.
Download it from my mirror here.
Info about Miracle Linux - Asianux
Complete PHP modules from Miracle Linux
4. Create local variable to connect to Oracle, for NLS_LANG you can set with your locale.
5. Update linux Library thingy... (locate the oracle library if you use differrent version)
6. (Re-)Start the Apache
B. Use your current PHP version from CentOS
If you already install your PHP and don't want to replace it with older version and/or your current version of PHP didn't provide php-oci8 packages you can install it using the following steps
This how to is modification of PHP-OCI8 in Ubuntu Forum
1. Install Oracle InstantClient
download it from http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html
My copy is here
2. Configure linux library thingie...
3. Install oci8 via pear
Make sure you already install php-devel package (and have upgrade to latest version)
My copy of oci8 is here
4. Enable oci8
5. (Re-)Start the Apache
Just want to make sure if your php is already configure with oci8 module create a php file with phpinfo() function
Create phpinfo file
View phpinfo. http://yourserver/phpinfo.php
You should see something like this