• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1519
  • Last Modified:

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?
  • 3
  • 3
1 Solution
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!
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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/libphp4.so

# 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  libphp4.so

man find

Webmin docs:

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now