Update (don’t install yet) to the latest trunk via Git or SVN, then…
Edit /opt/fog/.fogsettings (or just comment out this line):
packages=''
Purge everything php5:
sudo service apache2 stop
sudo apt-get purge -y php5 php5-common php5-json php5-gd php5-cli php5-curl php5-mysqlnd php5-fpm php5-mcrypt php5-readline libapache2-mod-php5
sudo rm -rf /etc/apt/sources.list.d/ondrej-ubuntu-php5-5_6-wily.list
sudo rm -rf /etc/apache2/mods-enabled/php5.conf
sudo rm -rf /etc/apache2/mods-enabled/php5.load
Install php7.0:
sudo add-apt-repository -y ppa:ondrej/php-7.0
sudo apt-get update
sudo apt-get install -y libapache2-mod-php7.0 php7.0 php7.0-phpdbg php7.0-readline php7.0-cgi libphp7.0-embed php7.0-cli php7.0-common php7.0-curl php7.0-fpm php7.0-json php7.0-mcrypt php7.0-mysql php7.0-opcache php7.0-gd php php-cli php-common php-curl php-gd php-mcrypt php-mysql php-readline
Edit /lib/ubuntu/config.sh (lines 19-23, 81, delete line 82):
php_ver=7.0
php_verAdds="-7.0"
repo="php${php_verAdds}"
[[ $php_ver != 7.0 ]] && phpcmd="php" || phpcmd="php"
[[ $php_ver != 7.0 ]] && phpfpm="php-fpm${php_ver}" || phpfpm="php7.0-fpm"
[[ $php_ver != 7.0 ]] && phpini="/etc/$phpcmd/$php_ver/apache2/php.ini" || phpini="/etc/$phpcmd/$php_ver/apache2/php.ini"
That’s it then install the current trunk that you already updated to and the install should finish without errors.
If I had to guess I’d imagine that my work on config.sh could be simplified or improved but this always works and I don’t ever have to worry about php5 trying to re-install via .fogsettings.
Please feel free to use any/all of these steps as any of you please. I’m no expert on php but I can’t see any reason why the latest FOG shouldn’t be pure php7.0.
Feedback is always welcome