Upgrade from php 5.6 to 7.0 or 7.1 gives error
I have a working site with php 5.6 hosted on Digital Ocean. When I switch the php version from current 5.6 to 7.0 or 7.1, I get the next error:
Fatal error: Uncaught Error: Call to undefined function mysql_pconnect() in /srv/users/serverpilot/apps/user1/public/Connections/PowerCMSConnection.php:66 Stack trace: #0 /srv/users/serverpilot/apps/tpca/public/index.php(2): require_once() #1 {main} thrown in /srv/users/serverpilot/app/suser1/public/Connections/PowerCMSConnection.php on line 66
Code in this file on PowerCMSConnection.php line 66 is:
$PowerCMSConnection = mysql_pconnect($hostname_PowerCMSConnection, $username_PowerCMSConnection, $password_PowerCMSConnection) or trigger_error(mysql_error(),E_USER_ERROR);
How to solve this?