RSS LinkedIn Twitter

Updating PHP on Fedora Core 4

November 2nd, 2007 Categories: Uncategorized

Using Amazon’s standard EC2 images as the base image to your servers probably means you’re going to be running Fedora Core 4, with outdated versions of PHP and MySQL. In my case PHP 5.0.4– and I’ve run into several problems with this, as I’ve wanted to use some of PHP’s advanced functionality. Functionality that is either not included by default with PHP 5.0, or not included at all.

An example of functionality not included by default would be JSON, and example of functionality not included at all would be memory based streams. Both of which have had or are having applications to this lab. I finally decided I needed to have PHP 5.2 installed on my servers. The only problem is that none of the repositories configured by default have PHP 5.2 packages for Fedora 4 (this is what has hindered me in the past).

I finally solved my problem after stumbling upon this site: remi.collet.free.fr (I knew my 3 years of French education in high school would pay off some day) that has a repository with lots of packages including update packages for MySQL and PHP for FC4.

I’ll outline the steps I followed to update PHP 5, and include the commands (which happen to be included on the above site, here although it may take a few minutes to find them if you don’t know French.

1. I downloaded (using wget) the repository configuration file to the repository configuration directory.

[bash]cd /etc/yum.repos.d/
wget http://remi.collet.free.fr/rpms/remi-fedora.repo[/bash]

Haven’t tried this yet but, according to Trent the URL has changed to:
[bash]wget http://rpms.famillecollet.com/remi-fedora.repo[/bash]
2. I made a yum call, enabling the repository in the process (as it’s disabled by default).
[bash]yum –enablerepo=remi install php-5.2.4[/bash]
3. I restarted Apache.
[bash]apachectl restart[/bash]
And that’s it. I now have PHP 5.2.4 running on Fedora 4. I’m sure that an expert could have accomplished it some other way, but as a relative n00b, I have to admit I quite rely on yum.

Tags:

2 Responses to “Updating PHP on Fedora Core 4”

  1. Trent Reimer
    February 19th, 2008 at 10:44
    1

    Thank you for posting this.

    Remi’s URL has changed so you may want to update your wget line. I believe now it would be:

    wget http://rpms.famillecollet.com/remi-fedora.repo

  2. May 2nd, 2008 at 20:33
    2

    Thank you Trent, for posting the updated URL.

Leave a Comment

*