PHP-4.3.11 + Oracle 10g dso

Support

Updated on 4 May 2005 on FC3

In this example, we compile only PHP Oracle DSO (Dynamic Shared Object) (oci8.so). So you need to keep PHP rpm installed.

Download PHP

  1. You need to download the source code of PHP. Note that you need to compile the same version of source as RPM. Download from http://jp2.php.net/downloads.php.
  2. Copy php-4.3.11.tar.gz under /usr/local/src. To compile it, you need Oracle environment, so you better be as an Oracle user for example.

    # su - oracle
    $ cp php-4.3.11.tar.gz /usr/local/src
    $ cd /usr/local/src
    $ tar zxvf php-4.3.11.tar.gz
    $ cd php-4.3.11
    $ ./configure --with-oci8=shared --enable-sigchild
    $ su - root
    # cp /usr/local/src/php-4.3.11/modules/oci8.so /usr/lib/php4/

     

    Note: The directory of the module is witten in php.ini as extension_dir = /usr/lib/php4. Change the location accordingly.

  3. Edit /etc/php.ini to load the dynamic extension (oci8.so)

    ;;;;;;;;;;;;;;;;;;;;;;
    ; Dynamic Extensions ;
    ;;;;;;;;;;;;;;;;;;;;;;

    extension=oci8.so

  4. Restart Apache
  5. To test it, create a phpinfo.php as below and open by browser. You will see oci8 support is enabled.

    <? phpinfo(); ?>

Back

Copyright © [- SroNey / JohN -]. All rights reserved

Hosted by www.Geocities.ws

1