How to install the OCI8 Oracle extension for PHP5 in Debian Lenny

The linked page describes it very well. Just a quick note for myself in case the original post disappears:
  1. Add the necessary APT repository:
    echo "# Oracle repositories for debian unstable
    deb http://oss.oracle.com/debian unstable main non-free" > /etc/apt/sources.list.d/unstable-oracle.list
    And the repository key:
    wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle  -O - | sudo apt-key add -
    Update the APT package cache:
    sudo apt-get update
  2. Get the necessary packages:
    sudo apt-get install build-essential php5-dev php5 php-pear oracle-xe-client apache2 libapache2-mod-php5
  3. Set the Oracle environment variables (this might not be necessary, but I did it anyway):
    ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client
    LD_LIBRARY_PATH=$ORACLE_HOME/lib
    TNS_ADMIN=/etc/oracle
    NLS_LANG=AMERICAN_AMERICA.UTF8
    export ORACLE_HOME LD_LIBRARY_PATH TNS_ADMIN NLS_LANG
  4. Compile the extension with PECL:
    pecl install oci8
    It will ask you for your Oracle directory. First enter "1", then enter the directory path (at the moment it's /usr/lib/oracle/xe/app/oracle/product/10.2.0/client).
  5. Create a php.ini for OCI8:
    echo "extension=oci8.so" > /etc/php5/conf.d/oci8.ini
  6. Restart Apache:
    invoke-rc.d apache2 restart
It should work by now. Test the extension.

A little help on the road: