Solved

upgrade php on a VPS

Posted on 2009-05-14
11
743 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
 
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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 dynamically set the form action using jQuery.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now