Solved

upgrade php on a VPS

Posted on 2009-05-14
11
768 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

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 …
This article discusses how to implement server side field validation and display customized error messages to the client.
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 a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

742 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