Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

upgrade php on a VPS

Posted on 2009-05-14
11
Medium Priority
?
795 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

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!

Question has a verified solution.

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

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

618 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