I've installed Scotch Box and updated the PHP version to PHP7. However, it seems like I've updated the PHP CLI, not the PHP version that Apache uses. I see other answers on SO saying that in the Apache httpd.conf there's a line that says
loadModule php5 or something. I've checked it and in my httpd.conf it doesn't say anything about loadModule at all.
I did see that PHP7 is installed in a path with
/cli/ in it, while PHP 5.6 is installed in a path with
apache in it.
In short, how do I get PHP7 to work on Apache installed on Scotch Box?
I use vagrant,and i use ubuntu as my OS,so i just use apt-get to install the php7...in my experience,you can switch the php version using：
sudo update-alternatives --query php sudo update-alternatives --set php /usr/bin/php7
if it didn't work ,you can try this:
sudo a2dismod php5.6 sudo a2enmod php7.0