Updated on 4 May 2005 on FC3
PHP-4.3.11 + Oracle 10g dso
In this example, we compile only PHP Oracle DSO (Dynamic Shared Object) (oci8.so). So you need to keep PHP rpm installed.
Download PHP
- 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.
- 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.
- Edit /etc/php.ini to load the dynamic extension (oci8.so)
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
extension=oci8.so
- Restart Apache
- To test it, create a phpinfo.php as below and open by browser. You will see oci8 support is enabled.
<? phpinfo(); ?>
Back