These packages were built for Oracle Enterprise Linux and Red Hat EL 4.7 and 5.3 on x86 and x86_64.
The packages are provided for installation convenience. They are not supported.
To install PHP for CLI use, as an Apache mod, and for use with FCGI:
Log into a command shell as the root user.
Deinstall any existing PHP packages. Use rpm -qa | grep php to show the php packages currently installed. Use rpm -e <package_name> to remove them.
Install the new PHP RPMs with the command:
rpm -ivh php-common-5.2.9-1.el5_2.i386.rpm php-cli-5.2.9-1.el5.i386.rpm php-5.2.9-1.el5.i386.rpm
Adjust the package names if installing the EL4 or 64 bit packages. If any dependencies are unsatisfied, install the required packages and retry the above command.
To verify the PHP RPMs have been installed, run rpm -qa | grep php. You should see:
php-common-5.2.9-1.el5 php-5.2.9-1.el5 php-cli-5.2.9-1.el5
Restart Apache:
/sbin/service httpd restart
The PHP configuration file is located at /etc/php.ini.
An empty directory /etc/php.d is created. It will contain configuration files of any PHP extensions installed in the future.
The Apache configuration file for PHP is in /etc/httpd/conf.d/php.conf.
The php-oci8 package depends on Oracle's free Instant Client Basic package. Download oracle-instantclient11.1-basic-11.1.0.7.0-1.i386.rpm and install it with:
rpm -ivh oracle-instantclient11.1-basic-11.1.0.7.0-1.i386.rpm
Install PHP's Oracle OCI8 extension with:
rpm -ivh php-oci8-11gR1-5.2.9-1.el5.i386.rpm
Restart Apache:
/sbin/service httpd restart
Verify that OCI8 is installed by saving this script in your document root, e.g. /var/www/html/pi.php, and loading http://localhost/pi.php in a browser:
<?php phpinfo(); ?>
The output should include a section on OCI8.
The Oracle Technology Network has a PHP Developer Center with many resources, in particular refer to the free Underground PHP and Oracle Manual. This book contains best practices information on using PHP and Oracle effectively and efficiently, with lots of examples and sample code.
Back to PHP RPM project home page