Welcome to WebmasterWorld Guest from 54.234.63.187

Forum Moderators: bakedjake

Message Too Old, No Replies

Upgrading from PHP4 to PHP5 in Linux

     

Saint Honore

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

5+ Year Member



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.

encyclo

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

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

vincevincevince

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

WebmasterWorld Senior Member vincevincevince is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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)

5+ Year Member



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.

encyclo

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

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



2.6.11-6mdk

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?

vincevincevince

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

WebmasterWorld Senior Member vincevincevince is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month