Having php5 and php7 on same system.

Many a time you will find more than one version of php installed on your system. Lately two of the most common versions are php5 and php7.

You may try dpkg -l | grep php to find detail on php packages installed.
You may find something like:

rc php5-cli 5.6.18+dfsg-1+deb.sury.org~trusty
rc php5-common 5.6.18+dfsg-1+deb.sury.org~trusty
rc php5-curl 5.6.18+dfsg-1+deb.sury.org~trusty
rc php5-fpm 5.6.18+dfsg-1+deb.sury.org~trusty binary)

Here on above rc means packages has been removed but not purged. Configuration files would be still there. You can remove configuration files also by purging php5 packages:

ADVERTISEMENT

apt-get purge {php5-package_name}

Directory for php5 config is /etc/php5

Now apart from above packages, you may also find php5.6 and php7.0 packages like:
ii php5.6-cli 5.6.22-4+deb.sury.org~trusty language
ii php5.6-common 5.6.22-4+deb.sury.org~trusty
ii php5.6-curl 5.6.22-4+deb.sury.org~trusty
ii php5.6-fpm
...
ii php7.0-cli 7.0.7-4+deb.sury.org~trusty language
ii php7.0-common 7.0.7-4+deb.sury.org~trusty
ii php7.0-curl 7.0.7-4+deb.sury.org~trusty
ii php7.0-fpm 7.0.7-4+deb.sury.org~trusty

Here above ii means packages are installed on your system. Easyengine install php5.6 by default and that is used to run all the admin webtools. Installed php 5.6 and php 7.0 comes from same repository – https://launchpad.net/~ondrej/+archive/ubuntu/php

ADVERTISEMENT

Recently php5.5 was also added on the same repo so you may find directory like /etc/php/5.5. But as it is not installed it is not needed and will not cause any harm.

If you want to remove php5.6, you can try ee stack remove php but that will break 22222 and any site using that version of php.

Therefore, we would suggest not to remove php5.6. If needed you can stop it’s services using the command: sudo service php5.6-fpm stop