I upgraded from Ubuntu 14.04 to Ubuntu 16.04 lately. This brings the joy of PHP 7.0.4 and Apache 2.4. As I run Magento 2 locally for testing purposes, I found it did not work anymore after the upgrade.
Actually I had 3 problems:
1.) Missing PHP extensions
I decided to start a new Magento 2.0.5 setup to check the requirements. From there I found out that I was missing some PHP extensions, so I installed them:
sudo apt-get install php-curl sudo apt-get install php-intl sudo apt-get install php-mbstring sudo apt-get install php-zip
After reloading the Magento 2 front page, I got a strange SQL error on the fronted (sorry, I did not copy the error message). I found out that also MySQL workbench did not like to connect to my local MySQL server (“[ERROR] Native table ‘performance_schema’.’session_variables’ has the wrong structure” and some more). Somehow it seemed that also MySQL was not running, so I started and restarted MySQL and everything was fine again. Hm.
3.) Enable Apache 2.4 rewrites
The homepage came back on screen, but I was not able to open the admin login page or any other pages. I thought this would have been caused by a missing mod_rewrite, but this was in place.
Somehow I ended up on the devdocs where a solution for the Apache 2.4 rewrites was in place:
Just add the following piece to your 000-default.conf file:
sudo nano /etc/apache2/sites-available/000-default.conf
<Directory "/var/www/> AllowOverride All </Directory>
Hope this helps anyone running into the same problems.
Oh, and btw: Make sure you run at least Magento 2.0.1 for PHP7 fun 🙂