I have an eCommerce site set-up and running on my DO droplet. I want to upgrade this software however, upgrade requirements state that I should also upgrade to PHP 5.6. While it’s not clear as to why this software now needs PHP 5.6, I did notice an issue with how my droplet reports which version of PHP it’s using.
I now see “PHP Version 5.6.23-1+deprecated+dontuse+deb.sury.org~trusty+1” when hitting my phpinfo.php page. However, when I invoke “php -v” on the command line, I see:
PHP 7.0.8-4+deb.sury.org~trusty+1 (cli) ( NTS ).
I believe 5.5.x, 5.6.x, and 7.0.x versions of PHP can all live together on the same server, how do I ensure Apache is serving up my site with a non-deprecated version of PHP 5.6?
Please note that phpinfo shows my loaded configuration file is /etc/php5/apache2/php.ini so that seems correct.
LAMP stack versions:
- Ubuntu 14.04.4 LTS (GNU/Linux 4.4.0-28-generic x86_64)
- Apache 2.4.7
- MySQL 14.14 Distrib 5.5.49, for debian-linux-gnu (x86_64) using readline 6.3
- PHP 7.0.8-4+deb.sury.org~trusty+1 (cli) ( NTS )
Copyright © 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright © 1998-2016 Zend Technologies with Zend OPcache v7.0.8-4+deb.sury.org~trusty+1
Is there an easier way to enforce which version of PHP my server utilizes?