Warning: Creating default object from empty value in /home/mirandam/public_html/linux/wp-includes/functions.php on line 292
Fedora, Linux and Stuff :: PHP4 on Fedora Core 4

PHP4 on Fedora Core 4

Sunday, October 9th, 2005 ~ 12:56 pm by Mauriat Miranda

EDIT (Dec 19, 2005):
I have written a formal guide on PHP4 on FC4.

One of my biggest difficulties with using Fedora Core 4 was that it packages PHP5 with the Apache webserver. Any experienced person should know that Fedora Core is probably a terrible Linux Distribution to be using for a large scale Web Server on the Public Internet. However, it may be sufficient for home or Intranet usage.

What I like to do is, I mirror my public main site mjm wired on my home Linux computer. This was very easy with FC1 - FC3, however PHP5 broke several things in my PHP code. I tried fixing most of them, but it wasn’t worth the effort since my current hosting provider is still on PHP v4.3.10. Anyways, I tried meddling with the PHP4 RPM in FC3 - that was no good. Then I tried recompiling the source RPM for FC3 (src.rpm), but that caused too many compiler errors and with over 60 lines of configure options to compile I couldn’t figure out all the dependancies and flags to satisfy the compile. I had some problems with some XML libraries.

In the end I just compiled the tar.bz2 with some minimal settings. I set the install directory to use /opt/php4 so as not to disturb PHP5. It properly installs the PHP4 Apache Module in the correct location. Then I had to edit /etc/httpd/conf.d/php.conf to disable PHP5 and enable PHP4. So now Apache2 on FC4 runs PHP4 correctly for me. I know there is some way to run them in parallel with controlling certain directories and controlling certain Types (.php, .php4, .php5), but I don’t require this at the moment.

I might write a formal process on this later when I get the time. However, I do think that there MUST be a better way to do this, I am open to suggestion or tips.

2 Responses to “PHP4 on Fedora Core 4”

  1. Linux with Doubts » Blog Archive » PHP4 RPMs for Fedora Core 4 Says:

    […] As a followup to my previous post about PHP4 on FC4, I decided to abandon PHP5 altogether. I spent some time to try and get the PHP4 src.rpm from FC3 to compile correctly in FC4. As it turned out neither the GCC4 nor the GCC3.2 included in FC4 would compile everything properly. So I decided to try GCC3.4 (which I installed from source long ago when first tweaking with FC4). […]

  2. webxser Says:

    I think your valued procedure is very useful for many people who installed the FC4 and going to downgrade the PHP5 to PHP4. May I also have the procedure how to do that? I read many forums and nothing can help.