• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Update php version?

Matthew1

New Pleskian
I've tried a few times to update php on my server from version 5.3 to the latest 5.5 however it keeps conflicting with apache2 that's installed and I ended up having to re-install everything as I accidentally deleted Plesk attempting to fix it.

Ideally I'd rather just run nginx with php-fpm without apache but it's not as straightforward anymore with plesk and I have no idea how to go about updating PHP?

I've got a clean install of Parallels Plesk v12.0.18_build1200140606.15 running on Ubuntu 12.04.2 LTS.
 
Hi Matthew1,

with Ubuntu you could use for PHP 5.4:
Code:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5-oldstable
sudo apt-get update
sudo apt-get upgrade

If you would like to use PHP 5.5 instead, please use:
Code:
sudo add-apt-repository ppa:ondrej/php5

To avoid mistakes, while upgrading, please READ the output of the commands, before hitting ENTER to proceed with a command.
It is sometimes as well a good idea to use "aptitude" instead of apt-get, because this will give you some possible choices, if "dependencies errors" come forward, while updating.
 
I've tried doing the following:

Code:
sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get upgrade

and then running

Code:
/usr/local/psa/bin/php_handler --add -displayname php-5.6.2-path /usr/bin/php5-cgi -phpini /etc/php5/fpm/php.ini -type fastcgi -id 2
I then go to hosting settings and select the new version of php, However nothing happens at all, the phpinfo() still reports running PHP version 5.3.10.
 
Last edited:
Hi Matthew1,

if you UPGRADE, like suggested above, then there won't be any PHP version 5.3 anymore. Please post the reply of the command "php -v" and post as well the command replies, when you do the upgrade steps as mentioend above.

The additional php-handler is only necessary, if you install another instance of PHP on your server. Please provide the steps, before adding the additional php-handler.
 
I have been attempting to upgrade, but for some reason packages are getting deleted that shouldn't.
I ran as above, except using apt-get dist-upgrade instead in between your reply.

I have a copy of the output here: http://pastebin.com/qCpqiFvt
 
Hi Matthew1,

... and why did you add another php-handler... and with the displayname "php-5.6.2", if you only upgraded to "PHP 5.5.21" ?

With your commands, you uninstalled Plesk as well, as you can see in your log. Consider using a backup to revert all your changes.
 
Another question:

It is a fresh vps install, after adding the repo I've done 'aptitude install php5' this time (nothing else), and it is wanting to remove the following packages:

Code:
1)      apache2
2)      apache2-mpm-prefork
3)      apache2.2-bin
4)      apache2.2-common
5)      libapache2-mod-aclr2-psa
6)      libapache2-mod-fcgid-psa
7)      libapache2-mod-perl2
8)      libapache2-mod-php5
9)      libapache2-mod-python
10)     libapache2-mod-rpaf
11)     libaprutil1-dbd-sqlite3
12)     libaprutil1-ldap
13)     php5
14)     php5-cgi
15)     php5-cli
16)     php5-curl
17)     php5-fpm
18)     php5-gd
19)     php5-imap
20)     php5-mysql
21)     php5-sqlite
22)     php5-xsl
23)     plesk-core
24)     plesk-l10n
25)     pp-sitebuilder
26)     psa
27)     psa-atmail
28)     psa-backup-manager
29)     psa-horde
30)     psa-imp
31)     psa-ingo
32)     psa-kronolith
33)     psa-libxml-proxy
34)     psa-migration-agents
35)     psa-migration-manager
36)     psa-mimp
37)     psa-mnemo
38)     psa-mod-fcgid-configurator
39)     psa-passwd
40)     psa-php5-configurator
41)     psa-spamassassin
42)     psa-turba
43)     psa-updates
44)     psa-vhost
45)     sshterm

Why does it want to delete all of Plesk?

I'm sorry to be annoying or whatever, but this is really confusing - it doesn't seem to let me update without affecting Plesk in some way. It seems to have some dependency issues
 
Last edited:
Hi Matthew1,

to learn more about "aptitude" and it's usage, please consider using the man-pages or try sites like "https://help.ubuntu.com/". Be aware that Plesk is not shipped with apache or PHP and instead uses the versions, which YOU install on your server. Because of dependencies it is always wise to FIRST install all services and upgrade them to the desired versions, before installing Plesk. If you upgrade services, while Plesk is already installed, please use the different choices, which you get, when using "aptitude"... the first choice is not always the best as you can see with your example, because it REMOVES packages, instead of upgrading them - please have a closer look on the output after any command, because this will mostly explain more, than any documentation and choose as well once the non-standard, to see differences.
 
Back
Top