Recipe for PHP4 on FC4
Posted on March 31, 2007
Filed Under General |
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
The site I am trying to run on EC2 runs on PHP4, not PHP5. FC4 uses PHP5 by default so I have to remove php5 and then reinstall php4.
So here’s my recipe
Remove PHP5
yum remove php
Get the PHP4 files that you need. You can check the FC3 update page for the most recent versions of php4. It’s a big page and will take a while to open so be patient.
I set up a directory in my users home directory called php and then
wget http://download.fedora.redhat.com/pub/fedora/linux/core/updates/3/i386/php-4.3.11-2.8.i386.rpm
wget http://download.fedora.redhat.com/pub/fedora/linux/core/updates/3/i386/php-imap-4.3.11-2.8.i386.rpm
wget http://download.fedora.redhat.com/pub/fedora/linux/core/updates/3/i386/php-pear-4.3.11-2.8.i386.rpm
wget http://download.fedora.redhat.com/pub/fedora/linux/core/updates/3/i386/php-mysql-4.3.11-2.8.i386.rpm
wget http://download.fedora.redhat.com/pub/fedora/linux/core/updates/3/i386/php-xmlrpc-4.3.11-2.8.i386.rpm
wget http://download.fedora.redhat.com/pub/fedora/linux/core/updates/3/i386/php-gd-4.3.11-2.8.i386.rpm
wget http://download.fedora.redhat.com/pub/fedora/linux/core/updates/3/i386/php-domxml-4.3.11-2.8.i386.rpmrpm -ivh php-*.rpm
And of course it fails due to a bunch of dependencies
error: Failed dependencies:
libcrypto.so.4 is needed by php-4.3.11-2.8.i386
libdb-4.2.so is needed by php-4.3.11-2.8.i386
libssl.so.4 is needed by php-4.3.11-2.8.i386
libexslt.so.0 is needed by php-domxml-4.3.11-2.8.i386
libxslt.so.1 is needed by php-domxml-4.3.11-2.8.i386
libc-client.so.0 is needed by php-imap-4.3.11-2.8.i386
libcrypto.so.4 is needed by php-imap-4.3.11-2.8.i386
libssl.so.4 is needed by php-imap-4.3.11-2.8.i386
libmysqlclient.so.10 is needed by php-mysql-4.3.11-2.8.i386
So let’s add some more stuff to fix these problems
yum install openssl097a
wget ftp://ftp.univie.ac.at/systems/FreeBSD/ports/distfiles/rpm/i386/fedora/4/compat-db-4.2.52-3.fc4.i386.rpm
rpm -i compat*wget ftp://fr.rpmfind.net/linux/redhat/8.0/en/os/i386/RedHat/RPMS/libxslt-1.0.19-1.i386.rpm
rpm -i libxslt*wget ftp://fr2.rpmfind.net/linux/fedora/core/4/i386/os/Fedora/RPMS/libc-client-2002e-9.i386.rpm
rpm -i libc-client*wget ftp://fr2.rpmfind.net/linux/fedora/core/4/i386/os/Fedora/RPMS/mysqlclient10-3.23.58-6.i386.rpm
rpm -i mysqlclient*
Try installing php again
rpm -ivh php-*.rpm
No complaints this time.
So let’s check it out and see if it worked.
service httpd restart
Got back the OK message
Now I don’t want yum doing any php updates so I going to edit yum.conf
cd /etc
vim yum.conf
At the bottom add
exclude=php*
And the final check to add a phpinfo file into the web directory and there you go.








My name is Alex Nesbitt. This is my blog. I publish Digital Podcast where I evangelize new media and marketing innovation, with a focus on digital media, social media, social networks, social analytics and influencer marketing.