I had a similar issue, but was able to upgrade just fine, however when I tried to run the
/enrol/database/cli/sync.php -v command for the database enrollment script.
I had to completely remove php5.6 from the server because this one script was seeing it and failing. It was not enabled in apache2, it did not report in php -v or when you create a file with
<?php phpinfo();?> in it.
Hope this helps someone else.