Did you try this one? https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04
PHP7 & Digitalocean Problem
I have a hosting on Digital Ocean.
I installed LAMP on my server and Laravel by following. It works perfectly.
https://laracasts.com/discuss/channels/laravel/install-laravel-on-digitalocean-by-lamp
But it is now PHP5 and I would like to have PHP7.
I searched a lot of tutorials online to upgrade PHP7 but I couldn't succeed.
https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04
Is there an article or a simple command for me to upgrade to PHP7? or maybe a LAMP that comes with PHP7 out of the box.
My real problem was
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/php5.load: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.
Solved it by running
$ cd /etc/apache2/mods-enabled
$ a2dismod php5
$ service apache2 restart
The only problem remains is phpmyadmin on PHP7.
I run this command as suggested in https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04
sudo add-apt-repository ppa:nijel/phpmyadmin
sudo apt-get install phpmyadmin
But I get this error
The following packages have unmet dependencies:
phpmyadmin : Depends: php5-json but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I googled again and found this solution
In my public folder ( var/www/html ) I ran this command.
apt-get install git
git clone --depth=1 --branch=STABLE https://github.com/phpmyadmin/phpmyadmin.git
It is really too much work to get it up running :)
Hopefully this will post will save time for people, who have same problem.
Please or to participate in this conversation.