You should be able to run different versions on live and local. The only restriction is that you have to use mySQLi for php7+. Any other version differences shouldn't be significant.
You can remove the php version change if your files are updated to mySQLi.
I'm not following the description of the issue you are still having... Maybe send me a screen grab of the error with a detailed description of what you do to get the error and I can provide more guidance.