From this moment, the solution should very easy, just do:
apt-get update
apt-get upgrade
Since it seems that adding another PPAs is too complicated, I have merged all necessary packages into the main repository, so this should not happen anymore.
Edit: JFTR the php5-fpm no longer depends on any systemd component, so it can be installed without the hassle of pulling libsystemd-daemon0.
The old php5-*
packages are coinstallable with the new phpX.Y-*
scheme, so the first thing you need to do is to install and enable new packages:
Apache 2.4
You need to install new libapache2-mod-phpX.Y
packages and then disable the old php5, and enable new versioned module, f.e. for PHP 5.6:
sudo apt-get install libapache2-mod-php5.6
sudo a2dismod php5
sudo a2enmod php5.6
NGINX/Apache 2.4 with PHP-FPM
This is even more straightforward, just install phpX.Y-fpm
and change the socket path in your webserver configuration to /run/php/phpX.Y-fpm.sock
and copy the old configuration, f.e. for PHP 5.6:
sudo apt-get install php5.6-fpm
# now change the socket path in your nginx/apache2 configuration
# and restart the server
If you have defined more FPM pools, you need to copy the old configuration to the new path, again for PHP 5.6:
# keep the new www.conf
sudo mv /etc/php/5.6/fpm/pool.d/www.conf /etc/php/5.6/fpm/pool.d/www-5.6.conf
# copy the old configuration to the new path
sudo cp /etc/php5/fpm/pool.d/* /etc/php/5.6/fpm/pool.d/
sudo update-rc.d php5-fpm disable # or uninstall php5-fpm package
# restart PHP 5.6 FPM to read the new configuration
sudo service php5.6-fpm restart
Now if you want to remove the old packages, you might run into some problems as there might be packages that require old php5* names, you might want to add ppa:ondrej/php5-compat
that provide thin layer of compatibility packages that map php5-<foo>
to php5.6-<foo>
for main php5* packages:
sudo add-apt-repository ppa:ondrej/php5-compat
sudo apt-get update
sudo apt-get dist-upgrade
Definitely try this first in non-production environment! The good side is that this keeps the old configuration in /etc/php5
untouched, so you can migrate the old settings.
After updating the main PHP packages, you might want to lookup rest of the php5-*
packages and install their equivalent, e.g.
apt-get install php-apcu # for php5-apcu
apt-get install php-memcached # for php5-memcached
I'll prepare an update to php5-compat repo, that will make this mappings automatically.
The more up-to-date text, can be always found in the DEB.SURY.ORG PPA Wikis.
Best Answer
If you really need PHP 5.5, than install this version with this command (for version
5.5.24+dfsg-1+deb.sury.org~vivid+1
) and check the correct version here:and set the package on hold:
Otherwise you'll get in the next update again version 5.6