PHP RPM Package Installation for PHP 5.2 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.
Installing PHP for Command-line, Apache Module, and PHP Fast CGI Use To install PHP for CLI use, as an Apache mod, and for use with FCGI: 1. Log into a command shell as the root user. 2. 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. 3. Install the new PHP RPMs with the command: rpm -ivh php-common-5.2.9-1.el5_2.i386.rpm php-cli-5.2.91.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. 4. To verify the PHP RPMs have been installed, run rpm -qa | grep php. You should see: 5. php-common-5.2.9-1.el5 6. php-5.2.9-1.el5 7. php-cli-5.2.9-1.el5
8. 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.
Installing the OCI8 Extension for Oracle Database
1. 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
2. Install PHP's Oracle OCI8 extension with: rpm -ivh php-oci8-11gR1-5.2.9-1.el5.i386.rpm
3. Restart Apache: /sbin/service httpd restart
4. 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: 5.
The output should include a section on OCI8. 8. Optionally configure OCI8 tuning parameters in /etc/php.d/oci8.ini before restarting Apache.
Using the OCI8 Extension 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