homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

Upgrading from PHP4 to PHP5 in Linux
Saint Honore

 2:42 am on Nov 20, 2008 (gmt 0)

Hi Everyone,

I have been working with windows environment till now. However I have been asked to work on Linux environment. Since the PHP version is 4 i need to upgrade to PHP5 also same for MySQL4 to MySQL 5. Can anyone help me out their.

I have zero knowledge about the linux commands.

Thanks in advance.



 3:09 am on Nov 20, 2008 (gmt 0)

What Linux distribution and which version is the server running?

The easiest way is to have the server OS updated to a later version of the distribution you are using. Due to the level of integration within Linux distros, it is usually not a good policy to upgrade manually to newer PHP/MySQL versions which would not be supported on the underlying OS version.


 3:35 am on Nov 20, 2008 (gmt 0)

You could try, as root, these commands:

yum update php
apt-get upgrade php

Odds are one of them will work; if not come back with the output of:

uname -a

Saint Honore

 6:03 am on Nov 20, 2008 (gmt 0)

I tried those commands as root, but I got the following messages.

[root@nisi-lamp ~]# yum update php
-bash: yum: command not found

[root@nisi-lamp ~]# apt-get upgrade php
-bash: apt-get: command not found

[root@nisi-lamp ~]# uname -a
Linux nisi-lamp 2.6.11-6mdk #1 Tue Mar 22 16:04:32 CET 2005 i686 Intel(R) Celeron(R) CPU 2.20GHz unknown GNU/Linux

could you please help about these.

Thanks in advance.


 11:17 am on Nov 20, 2008 (gmt 0)


This indicates that you might be using the Mandriva distribution: [mandriva.com...] . Mandriva uses the urpmi command and not yum (which is for Red Hat/Fedora).

You are probably using version 10.2, which dates from a few years back (2005). Mandriva has release many new versions since then, it is unlikely that you will be able to easily upgrade PHP and MySQL without compiling them manually - and even then matching the dependencies will be a challenge.

So as I said above, you really need an OS upgrade. Is this a dedicated server? Who supplies and manages it?


 3:18 pm on Nov 20, 2008 (gmt 0)

encyclo is right; but if you need a quick fix, try this:
urpmi php

It may, as encylo points out, not work as your operating system is out of date. But it might just manage it... probably safe if it's a dev server but you do need an OS upgrade if it's a live server.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved