tablain Posted June 13, 2019 Share Posted June 13, 2019 I need somebody to fix mysql related error. I had to reset server but before that took backup.After reset restore backup ( files and DB ) but giving error. After check i found erro log is: Quote [13-Jun-2019 14:05:51 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/sitename/public_html/classes/MySQL.php:21 Stack trace: #0 /home/sitename/public_html/classes/Db.php(75): MySQL->connect() #1 /home/sitename/public_html/classes/Db.php(56): Db->__construct() #2 /home/sitename/public_html/classes/Configuration.php(258): Db::getInstance() #3 /home/sitename/public_html/config/config.inc.php(64): Configuration::loadConfiguration() #4 /home/sitename/public_html/index.php(4): include('/home/premiumin...') #5 {main} thrown in /home/sitename/public_html/classes/MySQL.php on line 21[/quote] I need someone who can fix it real quick. So reply ASAP. Thanks Link to comment Share on other sites More sharing options...
roja45 Posted June 13, 2019 Share Posted June 13, 2019 Did you change the version of PHP that you are using? Link to comment Share on other sites More sharing options...
tablain Posted June 13, 2019 Author Share Posted June 13, 2019 it is PHP 7.0, Link to comment Share on other sites More sharing options...
roja45 Posted June 13, 2019 Share Posted June 13, 2019 Change it to 5.6. Which version of Prestashop are you using? Link to comment Share on other sites More sharing options...
tablain Posted June 13, 2019 Author Share Posted June 13, 2019 5 minutes ago, roja45 said: Change it to 5.6. Which version of Prestashop are you using? I just noticed, phpmyadmin says 7.2.7: Mine version: I installed 7.2 and gonna apply for this cPanel, lets see. Link to comment Share on other sites More sharing options...
tablain Posted June 13, 2019 Author Share Posted June 13, 2019 Damn!!, still no luck Link to comment Share on other sites More sharing options...
tablain Posted June 13, 2019 Author Share Posted June 13, 2019 After apply some changes it shows now: [13-Jun-2019 16:35:26 UTC] PHP Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /home/sitename/public_html/config/config.inc.php on line 18 [13-Jun-2019 16:35:26 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/sitename/public_html/classes/MySQL.php:21 Stack trace: #0 /home/sitename/public_html/classes/Db.php(75): MySQL->connect() #1 /home/sitename/public_html/classes/Db.php(56): Db->__construct() #2 /home/sitename/public_html/classes/Configuration.php(258): Db::getInstance() #3 /home/sitename/public_html/config/config.inc.php(64): Configuration::loadConfiguration() #4 /home/sitename/public_html/index.php(4): include('/home/premiumin...') #5 {main} thrown in /home/sitename/public_html/classes/MySQL.php on line 21[/quote] Link to comment Share on other sites More sharing options...
tablain Posted June 13, 2019 Author Share Posted June 13, 2019 New update: Using PS 1.3.3 I applied PHP 5.4 to domain from cPanel. Somehow site loaded, got access backoffice, homepage too. But inner pages showing error. I checked log file and found error: PHP Deprecated: Function eregi() is deprecated in /home/sitename/public_html/tools/smarty/compile/%%60^60C^60C3B71C%%header.tpl.php on line 66 PHP Deprecated: Function eregi() is deprecated in /home/sitename/public_html/tools/smarty/compile/%%60^60C^60C3B71C%%header.tpl.php on line 93 homepage product images got broken too, Link to comment Share on other sites More sharing options...
roja45 Posted June 13, 2019 Share Posted June 13, 2019 Yes, it's because the method that version of Prestashop is using to connect to the database is old and has been removed from newer versions of PHP. Clear the cache and turn off debug mode, and see if the site works well enough. I think you might struggle to get rid of those warnings though, you would need to go to an earlier version of PHP, but I doubt it will be available now on your hosting. Your Prestashop version is getting a bit old now! If you need to fix this, then it might take some development changes, you can send me a private message about this, or if you fancy a site upgrade 😄 Link to comment Share on other sites More sharing options...
tablain Posted June 14, 2019 Author Share Posted June 14, 2019 I am still looking for fix, somebody send me PM with chat ID, Ready to pay as well. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now