Here’s an update to this article:
The spec file has been modified to build the php-sqlite module which is needed by Plesk Sitebuilder. Here’s the new package:
Here’s an update to this article:
The spec file has been modified to build the php-sqlite module which is needed by Plesk Sitebuilder. Here’s the new package:
To facilitate upgrading CentOS 4 servers to PHP 5.2.9 we created a new source RPM. This work was based on previous RPMs by Jason at Utter Ramblings (http://www.jasonlitka.com).
Here’s a tar/gz with all the source and binary RPMS:
http://blogs.reliablepenguin.com/files/php-5.2.9_for_centos4.tar.gz
Contained in the package are the following files:
freetds-0.64-1.el4.rf.i386.rpm
freetds-devel-0.64-1.el4.rf.i386.rpm
libmcrypt-2.5.7-1.2.el4.rf.i386.rpm
libmcrypt-devel-2.5.7-1.2.el4.rf.i386.rpm
libtidy-0.99.0-12.20070228.jason.1.i386.rpm
libtidy-devel-0.99.0-12.20070228.jason.1.i386.rpm
pcre-6.6-1.1.i386.rpm
pcre-devel-6.6-1.1.i386.rpm
php-5.2.5-jason.2.src.rpm
php-5.2.9-rp.1.i386.rpm
php-5.2.9-rp.1.src.rpm
php-5.2.9.tar.gz
php-bcmath-5.2.9-rp.1.i386.rpm
php-cli-5.2.9-rp.1.i386.rpm
php-common-5.2.9-rp.1.i386.rpm
php-dba-5.2.9-rp.1.i386.rpm
php-devel-5.2.9-rp.1.i386.rpm
php-embedded-5.2.9-rp.1.i386.rpm
php-gd-5.2.9-rp.1.i386.rpm
php-imap-5.2.9-rp.1.i386.rpm
php-ldap-5.2.9-rp.1.i386.rpm
php-mbstring-5.2.9-rp.1.i386.rpm
php-mcrypt-5.2.9-rp.1.i386.rpm
php-mhash-5.2.9-rp.1.i386.rpm
php-mssql-5.2.9-rp.1.i386.rpm
php-mysql-5.2.9-rp.1.i386.rpm
php-ncurses-5.2.9-rp.1.i386.rpm
php-odbc-5.2.9-rp.1.i386.rpm
php-pdo-5.2.9-rp.1.i386.rpm
php-pgsql-5.2.9-rp.1.i386.rpm
php-snmp-5.2.9-rp.1.i386.rpm
php-soap-5.2.9-rp.1.i386.rpm
php-tidy-5.2.9-rp.1.i386.rpm
php-xml-5.2.9-rp.1.i386.rpm
php-xmlrpc-5.2.9-rp.1.i386.rpm
If you want to build install the binary distribution just do this:
1 2 3 4 |
rpm -Uvh freetds-0.64-1.el4.rf.i386.rpm \ libmcrypt-2.5.7-1.2.el4.rf.i386.rpm \ libtidy-0.99.0-12.20070228.jason.1.i386.rpm \ pcre-6.6-1.1.i386.rpm php-*.i386.rpm |
or you can rebuild the source rpm as follows:
1 2 3 4 |
rpm -i reetds-* libmcrypt-* \ libtidy-* pcre-* \ php-5.2.9-rp.1.src.rpm rpmbuild -ba /usr/src/redhat/SPEC/php.spec |
If you’ve not previously done so, you might need to install the rpm-build package in order to use the rpmbuild command. Also there will probably be some other dependencies that you have to install with yum to get the build to run.
After the build completes, just install the new binary packages:
1 |
rpm -i /usr/src/redhat/RPMS/i386/php-*.rpm |
Add the following lines to the vhost.conf file for the site:
1 2 3 |
<directory /var/www/vhosts/acme.com/httpdocs> php_admin_value register_long_arrays On </directory> |
And then do:
/usr/local/psa/admin/sbin/websrvmng -a -v
Add the following to the vhost.conf file:
1 2 3 |
<directory /var/www/vhosts/acme.com/httpdocs> php_admin_flag allow_url_fopen On </directory> |
Add c5-testing repository to yum:
1 2 |
cd /etc/yum.repos.d/ wget http://dev.centos.org/centos/5/CentOS-Testing.repo |
You can then view the latest available php packages with:
1 |
yum --disablerepo=\* --enablerepo=c5-testing list \*php\* |
Then you can install them with:
1 |
yum --disablerepo=\* --enablerepo=c5-testing install php |