Solved

upgrade php on a VPS

Posted on 2009-05-14
11
760 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
  • 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 14

Accepted Solution

by:
shobinsun earned 125 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ability to create nested list on the UI using PHP, HTML, Javascript 7 57
php error 27 55
Multi line FPDF footer: 3 22
Session time out quickly. 6 23
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

679 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