How to upgrade php4 to php5 by using webmin?

Hi, I am using Red Hat Linux 8.0, Apahce 2.0.4, MySql 3.0. And I want to upgrade php4 to php5 through webmin. How should I do that step by step? Thanks in advance.

P.S. or is it other easy way to do that without webmin?
Who is Participating?
yuzhConnect With a Mentor Commented:
Do a shell login as root (or login as a normal user then su as root):

1. backup your httpd.conf and php4 files (in case you need to use php4 again!)
2. uninstall php4
3. install php5 (from source ot binary package). then edit the httpd.conf

Have a look at the following docs to learn how to install/upgrade php:
     http:Q_21073715.html             # For Solaris but  similar idea for Linux
4. restart apache

5. test to see if your *.php file can run properly.

    Good luck!
jccwAuthor Commented:
Actually, I am new to Linux System.....
May you provide me the command lines to do the steps?
Thank you!
The links in my previuos comment has all the commandlines and steps.

Not sure how php and apache was installed in your box, can't gave you the EXACT commands to do the job.

Sorry a lot of reading.

also " How to uninstall php or recompile"

You can use:

find / -type f -name httpd.conf

to locate the file, and then backup it up, eg
    cp -p /path-to/httpd.conf /backup dir

If you know how php and apache was installed (from source, or just install binary package) and the installation path, please let us know.

Some experts might have time to give you the exact commands to perform the job.

Have a nice weekend, cheers!
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

jccwAuthor Commented:
Is there any rpm for php5 ?
jccwAuthor Commented:
Actually, I just know how to use webmin to control my box......
I click in the webmin's apache server and there's a function call reconfig known modules.. and I saw a list check boxes of mod_*** and find mod_php, mod_php3, mod_php4....
my red hat version is 8.0, apache is 2.0.4 , and php is 4.3 ..... I can't find the path that apache is located or php is located....
I only find there's some related files under /etc/httpd/conf and /etc/httpd/conf.d
httpd.conf is under conf folder, but there's no command line loadmodule Php4
and under conf.d folder, there's file call php.conf
and here's the codes:
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.

LoadModule php4_module modules/

# Cause the PHP interpreter handle files with a .php extension.
<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
    LimitRequestBody 524288

# Add index.php to the list of files that will be served as directory
# indexes.
DirectoryIndex index.php

>>I can't find the path that apache

you can use "find" command,


find / -type f -name httpd
find / -type f -name  php
find / -type f -name

man find

Webmin docs:   
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.