We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now


PHP for Linux

niftyhawk asked
Medium Priority
Last Modified: 2008-03-03

Where can I download the latest stable release of php 5 for Red Hat Linux?

Also, I want to upgrade from php 4 to php 5. Is there a step by step installation guide on how to install php5 on linux?

Watch Question

Top Expert 2005

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts



Thanks for the info. How do I know which version of apache is installed on my linux machine? is there a command for it? sorry, i am a newbie.

Top Expert 2005

httpd -v

Red Hat probalby has an RPM for PHP5. It is the easiest way to install if you're a newbie...
You might consider disabling php/apache/mysql that came with Redhat and take a look at XAMPP, which you can get http://www.apachefriends.org/en/xampp.html  This will install php4 and php5 with the ability to switch between them with one command.  It will also keep your php/apache/mysql and phpmyadmin configurations in sync with each other.  You can also plug Webmin in farily easily using the Webmin plugin.

Very easy install.  Instructions are here:  http://www.apachefriends.org/en/xampp-linux.html#377

The unix commandlines for php4 and php5 switching are:

By the following command you can switch "back" to PHP 4.x:

/opt/lampp/lampp php4

And with the following command you can switch back to PHP 5.x:

/opt/lampp/lampp php5

If you forgot which version of PHP is in use simply use phpinfo() or call this command:

/opt/lampp/lampp phpstatus

(No I don't work for apachefriends, but I like it a lot).  This is bettern than Redhat's RPMs IMO for newbies (and oldbies as well).

Hope this helps you.

Troy Jordan
Jordan Productions

Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.