Jump to content

PS error


tablain

Recommended Posts

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

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: JxX4T5G.png

Mine version: tnXRmO1.png

I installed 7.2 and gonna apply for this cPanel, lets see.

 

Link to comment
Share on other sites

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...