These packages are for Enterprise Linux 4 update 6 and Enterprise Linux 5 update 1 on x86.
The packages are provided for installation convenience and testing purposes. They are not supported. The PHP distribution is version 5.2.5, with the addition of an OCI8 extension patch for bug 42496.
The PHP packages are listed in tables 1.1, 1.2 and 1.3.
| php-5.2.5-1.i386.rpm | PHP module for the Apache HTTP Server |
| php-bcmath-5.2.5-1.i386.rpm | PHP bcmath extension for arbitrary precision mathematics |
| php-cli-5.2.5-1.i386.rpm | Command-line and CGI interfaces for PHP |
| php-common-5.2.5-1.i386.rpm | Common files for PHP packages |
| php-dba-5.2.5-1.i386.rpm | PHP dba extension for Berkeley style database access |
| php-devel-5.2.5-1.i386.rpm | Files for building PHP extensions |
| php-gd-5.2.5-1.i386.rpm | PHP gd extension for graphics |
| php-imap-5.2.5-1.i386.rpm | PHP IMAP message protocol extension |
| php-ldap-5.2.5-1.i386.rpm | PHP LDAP support for the Apache HTTP Server |
| php-mbstring-5.2.5-1.i386.rpm | PHP mbstring extension for multi-byte string functionality |
| php-mysql-5.2.5-1.i386.rpm | PHP mysql, mysqli and PDO_MYSQL extensions for the MySQL database |
| php-ncurses-5.2.5-1.i386.rpm | PHP ncurses terminal output interface |
| php-oci8-5.2.5-1.i386.rpm | PHP oci8 and PDO_OCI extensions for the Oracle Database |
| php-odbc-5.2.5-1.i386.rpm | PHP odbc extension |
| php-pdo-5.2.5-1.i386.rpm | PHP "PHP Data Object" (PDO) data access abstraction |
| php-pgsql-5.2.5-1.i386.rpm | PHP pgsql and PDO_PGSQL extensions for the PostgreSQL database |
| php-snmp-5.2.5-1.i386.rpm | PHP SNMP extension |
| php-soap-5.2.5-1.i386.rpm | PHP SOAP extension |
| php-xml-5.2.5-1.i386.rpm | PHP xmlwriter, xmlreader, xsl and dom extensions |
| php-xmlrpc-5.2.5-1.i386.rpm | PHP XML-RPC extension |
| php-5.2.5-1.el5.i386.rpm | PHP module for the Apache HTTP Server |
| php-bcmath-5.2.5-1.el5.i386.rpm | PHP bcmath extension for arbitrary precision mathematics |
| php-cli-5.2.5-1.el5.i386.rpm | Command-line and CGI interfaces for PHP |
| php-common-5.2.5-1.el5.i386.rpm | Common files for PHP packages |
| php-dba-5.2.5-1.el5.i386.rpm | PHP dba extension for Berkeley style database access |
| php-devel-5.2.5-1.el5.i386.rpm | Files for building PHP extensions |
| php-gd-5.2.5-1.el5.i386.rpm | PHP gd extension for graphics |
| php-imap-5.2.5-1.el5.i386.rpm | PHP IMAP message protocol extension |
| php-ldap-5.2.5-1.el5.i386.rpm | PHP LDAP support for the Apache HTTP Server |
| php-mbstring-5.2.5-1.el5.i386.rpm | PHP mbstring extension for multi-byte string functionality |
| php-mysql-5.2.5-1.el5.i386.rpm | PHP mysql, mysqli and PDO_MYSQL extensions for the MySQL database |
| php-ncurses-5.2.5-1.el5.i386.rpm | PHP ncurses terminal output interface |
| php-oci8-5.2.5-1.el5.i386.rpm | PHP oci8 and PDO_OCI extensions for the Oracle Database |
| php-odbc-5.2.5-1.el5.i386.rpm | PHP odbc extension |
| php-pdo-5.2.5-1.el5.i386.rpm | PHP "PHP Data Object" (PDO) data access abstraction |
| php-pgsql-5.2.5-1.el5.i386.rpm | PHP pgsql and PDO_PGSQL extensions for the PostgreSQL database |
| php-snmp-5.2.5-1.el5.i386.rpm | PHP SNMP extension |
| php-soap-5.2.5-1.el5.i386.rpm | PHP SOAP extension |
| php-xml-5.2.5-1.el5.i386.rpm | PHP xmlwriter, xmlreader, xsl and dom extensions |
| php-xmlrpc-5.2.5-1.el5.i386.rpm | PHP XML-RPC extension |
| php-5.2.5-1.src.rpm | Source RPM for PHP packages |
To install PHP for command-line use and as an Apache module:
Log into a command shell as the root user.
Backup and deinstall any existing PHP packages. Use
rpm -qa | grep phpto 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.5-1.i386.rpm php-cli-5.2.5-1.i386.rpm php-5.2.5-1.i386.rpm
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.5-1 php-5.2.5-1 php-cli-5.2.5-1
Restart Apache:
/etc/init.d/httpd restart
The PHP configuration file is located at /etc/php.ini.
An empty directory /etc/php.d is created. It will contain PHP per-extension ".ini" configuration files of any extensions installed in the future.
The Apache configuration file is in /etc/httpd/conf.d/php.conf.
The php-oci8 package depends on version 10.2.0.3 of Oracle's free Instant Client Basic package. Download oracle-instantclient-basic-10.2.0.3-1.i386.rpm and install it with:
rpm -ivh oracle-instantclient-basic-10.2.0.3-1.i386.rpm
Set the environment to use the Instant Client libraries.
Either set the environment variable
expor LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/oracle/10.2.0.3/client/lib
for each shell that uses PHP (e.g. prior to starting Apache)
Or alternatively create
/etc/ld.so.conf.d/instantclient.confcontaining the single line
/usr/lib/oracle/10.2.0.3/client/lib
and then run
/sbin/ldconfig
Install PHP's Oracle OCI8 and PDO_OCI extensions with:
rpm -ivh php-pdo-5.2.5-1.i386.rpm php-oci8-5.2.5-1.i386.rpm
Restart Apache:
/etc/init.d/httpd restart
Verify that oci8 is installed by loading this script in a browser:
<?php phpinfo(); ?>
The output should include sections on OCI8 and PDO_OCI
The Oracle Technology Network has a PHP Developer Center with many resources. In particular refer to the free Underground PHP and Oracle Manual