Page 1 of 1

Old PHP Version On VestaCP

Posted: Wed Dec 11, 2019 1:06 pm
by nkizza
Hello! I'm using Debian 8 + VestaCP setup. PHP was updated to version 7.2 and console shows proper PHP version:

Code: Select all

user@comp:~/conf/web$ php -v
PHP 7.2.21-1+0~20190807.25+debian8~1.gbp935ebf (cli) (built: Aug  7 2019 20:35:39) ( NTS )
But <?php phpinfo(); ?> script shows version 5.6. I'm using custom website template, which is a copy of default VestaCP template (I only changed paths to docroot), so there's no explicit setting to use this specific version of PHP.

I'm good with using one version for all websites on this server, but I can't figure out why it's 5.6 and not 7.2.

Could you please advice what can I do?

Re: Old PHP Version On VestaCP

Posted: Wed Dec 11, 2019 10:45 pm
by grayfolk
nkizza wrote:
Wed Dec 11, 2019 1:06 pm
Hello! I'm using Debian 8 + VestaCP setup. PHP was updated to version 7.2 and console shows proper PHP version:

Code: Select all

user@comp:~/conf/web$ php -v
PHP 7.2.21-1+0~20190807.25+debian8~1.gbp935ebf (cli) (built: Aug  7 2019 20:35:39) ( NTS )
But <?php phpinfo(); ?> script shows version 5.6. I'm using custom website template, which is a copy of default VestaCP template (I only changed paths to docroot), so there's no explicit setting to use this specific version of PHP.

I'm good with using one version for all websites on this server, but I can't figure out why it's 5.6 and not 7.2.

Could you please advice what can I do?
I hope you restart apache or php-fpm after upgrade?

Re: Old PHP Version On VestaCP

Posted: Sun Dec 15, 2019 9:39 am
by mehargags
You need to dis-associate Apache with your old PHP version using

Code: Select all

a2dismod
and then associate with desired version of PHP using

Code: Select all

a2enmod