PHP 5.6 -> PHP 7

     A short while ago I installed PHP 7 on our server.  However, the install script did not delete and replace all of PHP 5.6, consequently there were still bits of PHP 5.6 installed and bits of PHP 7 not installed.

     Today I rooted out the remaining PHP 5.6 modules and installed the missing PHP 7 modules.

     After doing so our home page no longer displayed.  I was able to chase this down to our counter script which used mysql_ calls which are deprecated in PHP 5.6 and removed entirely in PHP 7.

     In order to fix this I had to change all the mysql_ calls to mysqli_ calls.  There is one major difference between mysql_ and mysqli_ calls, and that is that mysqli allows more than one database to be open and used at once.  To accommodate this, the mysqli_connect returns a database handler that needs to be stored in a variable, like $dbh = mysqli_connect(yadda yadda yadda);

     And then calls to things like mysqli_query and mysqli_select have an additional parameter and that being the database handler so just add $dbh as your first parameter and otherwise the mysqli calls are pretty much direct replacements for the mysql calls.