View Full Version : How to get php 4.4.2 and php 5.1.4 running on fedora core 5?

17th June 2006, 07:42 PM

on my windows machine i have 1 apache service running on port 80 with php 5.1.4 and i have a second apache service on port 81 which runs php 4.4.2.. but i have no idea how to get this working on fedora core 5..

Besides that where do i donwload the php 4.4.2 rpm for fedora core 5 and is there any full guide somewhere to make this happen?

anyone got any ideas?

17th June 2006, 10:58 PM
i`m really wondering why this forum is called a support forum.. i`m not getting any support over here while there are hundreds!!! of people online!!!

and yes i know that this message is posted just a few hours ago.. o well i expect atleast one reply once every few hours of hundreds os people visit this forum but i guess 88% of the people are jsut fedora users without much knowledge of fedora itself to be able to provide the people who need a hard anwser with a anwser..

and the part that has the knowledge is probly not willing to walk through all the new threads a few times a day..

o well.. maybe i need to register at experts-exchange to see if they provide me with a good solution..

IF i found out how this works i will write a guide for this in dutch and anyone is free to translate it..

19th June 2006, 03:38 AM
FYI, as of this writing, 27 people have viewed this thread. You can figure out the odds of one of them knowing the answer and voluenteering it.

Had you searched the web you would have found this: http://www.mjmwired.net/resources/mjm-fedora-php4.html The magic search terms: fedora php4.

I assume you need this for some application.

19th June 2006, 07:55 AM
yes i have searched and found that link allong with serveral other ones but i need the newest version of the 4.x.x series and the latest one of the 5.x.x series.

i`m verry PRO linux but things like this are realy a peace of cake in windows :)

Omega Blue
19th June 2006, 10:20 AM
I don't understand why you need such a strange config.

20th June 2006, 02:47 AM
If you really need the latest you can get the rpm spec from the source rpm, bump the version, and rebuild.

The problem is that php doesn't seem to be parallel installable, as the guide mentioned removing php 5.

This is a no one bothers maintaining this so you get to kind of thing.

28th June 2006, 02:04 PM
There will never be a fully updated PHP4 rpm for Fedora. The Fedora philosophy is to support the latest version only. Hence the PHP4 is already discontinued. The guide linked above only references the latest PHP4 version released through the legacy support services (http://www.fedoralegacy.org/).

Hence you must recompile on your own or custom configure another SRC.RPM from somewhere else to suit your needs. There really is no simple solution as your needs are not very common.

And technically yes you can have both PHP versions parallely installed. You must compile them both as different modules and loaded separately in Apache. Then you must make sure the handlers for each module are specifically designated, ie. .php4 files load with the libphp4.so module and .php files load with the libphp.so module (which would be defaulted to PHP v5 from Fedora). Or something similar.

As for running 2 versions of Apache, that is also doable, but seems wasteful - unless the configurations for each will differ singnificantly. You can simply write your own script that launches an 2nd instance of httpd with manually specifiying your own custom httpd.conf and other config files and settings which are specific to your 2nd instance of Apache.

Some other distributions like SuSE do keep PHP4 at the latest version. You could try that or you can work out all the issues in porting their SRC.RPM. However in the end you most likely will have to build from source.

My opinion, yes you are right about FedoraForum it is more novices than highly technical people. Try linuxquestions.org or an apache or php mailing list or newsgroup for more focused questions. And finally, comparisons from Windows to Linux are meaningless and your expectations from FREE support are rather high.

28th June 2006, 04:37 PM
Here's how I did it.

Install PHP4 as a CGI-BIN module

# tar zxpf php-4.4.2.tar.gz

# cd php-4.4.2.tar.gz

# ./configure

# make

# cp sapi/cgi/php /var/www/cgi-bin/php4

# vi /etc/httpd/conf.d/php4.conf

AddHandler php4-script .php4
Action php4-script /cgi-bin/php4

DirectoryIndex index.php4

# cp /etc/php.ini /usr/local/lib/ (location of php4 ini file)

# /etc/rc.d/init.d/httpd restart