I upgraded php from 5.6.30-0+deb8u1 to 7.0.32-1~dotdeb+8.1 and civicrm is still giving me a php out of date error.

When I run php -v it says 7.0, but civicrm still thinks I'm on 5.6.

Do I need to purge php 5.6 if php -v tells me I upgraded to 7.0?

2 Answers 2


It depends on your hosting server. It is usually possible to specify different PHP versions for command line (eg. php -v) and php that is used by your web server. If you have no need for PHP 5.6 then I suggest you remove it and that trigger everything to use PHP 7.0. Otherwise you'll need to look at your webserver/php configuration to make sure PHP 7.0 is selected as default. Also, worth noting that PHP 7.0 is end of life soon, worth going to PHP 7.1 if available.


OK, so 2 steps

  1. Disable php5 and enable php7 in apache sudo a2dismod php5 sudo a2enmod php7 (maybe php7.0 sudo service apache2 restart

  2. civicrm needed me to install a few php extensions -

sudo apt-get install php-xml php7.0-gd php7.0-imap php7.0-mbstring memcache php-curl

sudo service apache2 restart

pretty much did the trick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.