This question already has an answer here:
The site "locusls.com" is not working, even it is working perfectly fine in localhost (The versions of PHP and Mysql of both localhost and live server is listed at the end of the mail). On troubleshooting we found that the loading of site was prevented by database code. For instance, our site connects to database via this code:
$dbhandle = @mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
When we changed above code to this:
$con=mysqli_connect($hostname, $username, $password);
if (mysqli_connect_errno()){
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
The site started to work partially. Throughout the site, the database code is written in former fashion and that is preventing the loading of site. There are lots of database code in the site, it's impossible to change the database code throughout the site. Kindly help me to fix this issue.
LocalHost: PHP Version : PHP version 5.6.37 MySql : Mysql Version 10.1.34-MariaDB
Plesk Server: PHP Version : PHP version 5.6.38 MySql : Mysql Version 10.2.18-MariaDB-cll-lve
</div>