Ssh – Using SSH to upgrade from PHP 5.1.6 to PHP 5.3
PHPssh
I have a virtual server with PHP 5.1.6. How can I upgrade to PHP 5.3 using SSH?
Thanks in advance,
John
Best Answer
Depending on the server operating system / linux flavour it might be as easy as:
yum update php
or
apt-get install php
Be aware this will update you to the latest version of php not necessarily 5.3, also be aware this might break things to proceed with caution!
if your running a redhat based system you should also be able to find a PHP 5.3 RPM which you can install with rpm -uvh rpmname.rpm if you need a specific version of php that yum can't provide.
You need only to add the repositories from dotdeb on the /etc/apt/sources.list file. Then use aptitude to reload the sources and check the php packages you have.
If the packages are correctly done, you should not lose any config, since configuration files are not overwritten during updates: if there's a conflict dpkg will ask what to do and you can choose to override or just save the new version with a different extension.
After that, just check the README.Debian on /usr/share/doc/ package documentation to see if there's anything else to complete the upgrade.
Try to rebuild the php-eaccelerator RPM against php 5.2.1. If you are not comfortable editing rpm spec files and compiling from source you shouldn't attempt this.
Best Answer
Depending on the server operating system / linux flavour it might be as easy as: yum update php or apt-get install php
Be aware this will update you to the latest version of php not necessarily 5.3, also be aware this might break things to proceed with caution!
if your running a redhat based system you should also be able to find a PHP 5.3 RPM which you can install with rpm -uvh rpmname.rpm if you need a specific version of php that yum can't provide.