Jump to content
tablain

PS error

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

Share this post


Link to post
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.

 

Share this post


Link to post
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]

Share this post


Link to post
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,

Share this post


Link to post
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 😄

Share this post


Link to post
Share on other sites

I am still looking for fix, somebody send me PM with chat ID, 

Ready to pay as well.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More