?
Solved

upgrade php on a VPS

Posted on 2009-05-14
11
Medium Priority
?
785 Views
Last Modified: 2012-06-27
How do I upgrade my PHP Version on my VPS?

I have:
Linux
PHP Version:  5.1.6
Web Server:  Apache/2.2.6 (Fedora)
Database Version:  5.0.22

Aparently I need to upgrade to the most recent version.

Thanks.
0
Comment
Question by:wownetwork
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 3
11 Comments
 
LVL 14

Expert Comment

by:shobinsun
ID: 24392195
Hi,


Here are few simple steps to upgrade PHP 5.1.x to 5.2.x(latest Release) on a virtual machine with Fedora/CentOS-5.

It uses RPM repository maintained by Remi.

Step 1: #wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm

Step 2: #wget http://rpms.famillecollet.com/el5.i386/remi-release-5-4.el5.remi.noarch.rpm

Step 3: #rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

RPM repository is now on your server but its disable by default. To enable it for PHP use following command.

#yum enablerepo=remi update php
(Make sure that yum package is installed on VPS)

You now have the latest version of PHP installed which you can check through.
# php -v


Hope this will help you.

Regards
0
 

Author Comment

by:wownetwork
ID: 24398093
I followed it and I get this:

[root@****** ~]# wget http://yum.baseurl.org/download/3.2/yum-3.2.0-1.src.rpm
--12:37:56--  http://yum.baseurl.org/download/3.2/yum-3.2.0-1.src.rpm
Resolving yum.baseurl.org... 140.211.167.207
Connecting to yum.baseurl.org|140.211.167.207|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 296761 (290K) [application/x-rpm]
Saving to: `yum-3.2.0-1.src.rpm'

100%[=============================================================>] 296,761      489K/s   in 0.6s

12:37:57 (489 KB/s) - `yum-3.2.0-1.src.rpm' saved [296761/296761]

[root@****** ~]# rpm -ivh yup*
error: File not found by glob: yup*
[root@****** ~]# rpm -ivh yum*
warning: yum-3.2.0-1.src.rpm: Header V3 DSA signature: NOKEY, key ID 69886cc7
error: cannot create %sourcedir /usr/src/redhat/SOURCES

Also the website says rpm -ivh yup* >> should this be yum?  I tried both anyways still got the above problem....
0
 
LVL 14

Expert Comment

by:shobinsun
ID: 24401587
HI,


yum upgrade php

or

Simply try this:

yum remove php-5.1.6
yum install php-5.2.8

or

Download the latest RPM here: http://rpm.pbone.net/index.php3

Once you have your RPM, install it.

rpm -ivh php-5.2.8-2.fc6.remi.x86_64.rpm

If it says that you are missing some dependencies, download those, install them (with rpm -ivh), and try again.

Some dependencies might error out saying that some files are conflicting. If this occurs you can remove the already installed dependency. To do so use something like this:

rpm -e php-common-5.1.6

Also, you can use RPM to install addons such as GD libraries or MySQL.


0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 14

Accepted Solution

by:
shobinsun earned 500 total points
ID: 24401589
0
 

Author Comment

by:wownetwork
ID: 24424707
Hi the problem is I don't have YUM installed on my VPS.
I use Network Solutions >> They gave me a little help today:

Install Yum dependencies:
"      http://download.fedoraproject.org/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/python-elementtree-1.2.6-5.x86_64.rpm
"      http://download.fedoraproject.org/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/python-sqlite-1.1.7-1.2.1.x86_64.rpm
"      http://download.fedoraproject.org/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/rpm-python-4.4.2-32.x86_64.rpm
"      http://download.fedoraproject.org/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/python-urlgrabber-2.9.9-2.noarch.rpm
"      http://download.fedoraproject.org/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/yum-metadata-parser-1.0-8.fc6.x86_64.rpm

then install yum:
"      http://download.fedoraproject.org/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/yum-3.0-6.noarch.rpm

Yet each one of these links are BROKEN?  Secondly they take 48 hours to get back to me.
Does anyone have any advice?
Again, here is my VPS info:
Linux
PHP Version:  5.1.6
Web Server:  Apache/2.2.6 (Fedora)
Database Version:  5.0.22
0
 

Author Comment

by:wownetwork
ID: 24467235
But still::

[root@******* ~]# rpm -ivh yum*
warning: yum-3.0-6.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
warning: yum-3.2.0-1.src.rpm: Header V3 DSA signature: NOKEY, key ID 69886cc7
Preparing...                ########################################### [100%]
   1:yum-metadata-parser    ########################################### [ 25%]
   2:yum                    ########################################### [ 50%]
   3:yum-updatesd           ########################################### [ 75%]
error: cannot create %sourcedir /usr/src/redhat/SOURCES

anyone?
0
 

Author Comment

by:wownetwork
ID: 24467271
Hi,

Ok so I got YUM installed:
[root@****** ~]# rpm -q yum
yum-3.0-6

Then I did:

[root@******** ~]# yum upgrade php
Loading "installonlyn" plugin
Setting up Upgrade Process
Setting up repositories
core                      100% |=========================| 1.1 kB    00:00
Error: Cannot find a valid baseurl for repo: extras

anyone?
0
 

Author Comment

by:wownetwork
ID: 24467374
[root@****** ~]# yum upgrade php
Loading "installonlyn" plugin
Setting up Upgrade Process
Setting up repositories
Reading repository metadata in from local files
Could not find update match for php
No Packages marked for Update/Obsoletion
[root@****** ~]# rpm -q php
php-5.1.6-3

[root@******* ~]# php -v
PHP 5.1.6 (cli) (built: Oct  4 2006 11:14:16)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with the ionCube PHP Loader v3.1.28, Copyright (c) 2002-2007, by ionCube Ltd.

So the problem is:
Reading repository metadata in from local files
Could not find update match for php
0
 

Author Comment

by:wownetwork
ID: 24467567
Doesn't seem like my PHP is updating...

[root@****** ~]# yum upgrade php
Loading "installonlyn" plugin
Setting up Upgrade Process
Setting up repositories
Reading repository metadata in from local files
Could not find update match for php
No Packages marked for Update/Obsoletion
[root@****** ~]# rpm -q php
php-5.1.6-3

[root@******* ~]# php -v
PHP 5.1.6 (cli) (built: Oct  4 2006 11:14:16)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with the ionCube PHP Loader v3.1.28, Copyright (c) 2002-2007, by ionCube Ltd.

I also tried:

yum !! enablerepo=remi update php

Still not updating?
So the problem is:
Reading repository metadata in from local files
Could not find update match for php
0
 

Author Closing Comment

by:wownetwork
ID: 31581772
T hanks
0
 

Author Comment

by:wownetwork
ID: 25093264
Hi, ok, So I have gone and stared downloading the RPM's or REMI's --- each time I download and execute the file - rpm -ivh filename -- I need to download more files.

Is there are package where all these files are already available?
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question