If you want to connect to an Oracle database with PHP, you can use Oracle's Instant Client and the oci8 module from pear.
Unzip these files in a new directory, e.g. /opt/oracle/instantclient.
mkdir -p /opt/oracle/instantclient
echo /opt/oracle/instantclient >> /etc/ld.so.conf
The previous two lines are supposed to create symlinks named libclntsh.so and libocci.so which we will need later. In my case these symlinks were not created by ldconfig, so I created them manually.
ln -s libclntsh.so.10.1 libclntsh.so
ln -s libocci.so.10.1 libocci.so
In the next step we will download the oci8 module with pear. Pear is in the php-pear package.
apt-get install php-pear
"Normally" we should be able to just use pear install oci8 now, but apparently pear is not able to figure out where the instantclient libraries are. So we will just download the oci8 module and build it on our own.
mkdir -p /usr/local/src
pear download oci8
tar xzf oci8-1.1.1.tgz
The oci8-1.1.1.tgz filename will of course change for newer releases.
To enable the oci8 module in the php.ini (/etc/php.ini), add a line
extension=oci8.so (put this line after the examples starting with ;extension).
Now stop and start Apache. You should see the oci8 module in the output of phpinfo().