egoodman Posted January 31, 2022 Share Posted January 31, 2022 Website is shopmichellefarms.com site was running fine last I checked a few weeks ago for my client. I just went on and saw the white wall of death. I threw it in debug mode and got the following message. Fatal error: Call to undefined function mysql_connect() in /home1/shopmichelle/public_html/classes/db/MySQL.php on line 51 Any advice and correcting this? Thanks for any help! Link to comment Share on other sites More sharing options...
MEG Venture Posted January 31, 2022 Share Posted January 31, 2022 Hi It seems a PHP version issue. Could you please check whether your PHP version matches to your Prestashop version using the table below? https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/#php-compatibility-chart Link to comment Share on other sites More sharing options...
egoodman Posted January 31, 2022 Author Share Posted January 31, 2022 I switched the PHP version to 7.1since this site version was 1.6... Now I have white screens on back end too. Debug mode is returning this: Fatal error: Uncaught Error: [] operator not supported for strings in /home1/shopmichelle/public_html/classes/db/DbQuery.php:96 Stack trace: #0 /home1/shopmichelle/public_html/Adapter/Adapter_EntityMapper.php(45): DbQueryCore->from('shop', 'a') #1 /home1/shopmichelle/public_html/classes/ObjectModel.php(233): Adapter_EntityMapper->load('1', NULL, Object(Shop), Array, NULL, true) #2 /home1/shopmichelle/public_html/classes/shop/Shop.php(131): ObjectModelCore->__construct('1', NULL, NULL) #3 /home1/shopmichelle/public_html/classes/shop/Shop.php(397): ShopCore->__construct('1') #4 /home1/shopmichelle/public_html/config/config.inc.php(114): ShopCore::initialize() #5 /home1/shopmichelle/public_html/admin123/index.php(36): require('/home1/shopmich...') #6 {main} thrown in /home1/shopmichelle/public_html/classes/db/DbQuery.php on line 96 Link to comment Share on other sites More sharing options...
MEG Venture Posted February 1, 2022 Share Posted February 1, 2022 (edited) You should update your DbQuery.php file. You can get it from github: https://github.com/PrestaShop/PrestaShop/pull/7232 https://github.com/PrestaShop/PrestaShop-1.6/blob/master/classes/db/DbQuery.php Edited February 1, 2022 by MEG Venture (see edit history) Link to comment Share on other sites More sharing options...
egoodman Posted February 1, 2022 Author Share Posted February 1, 2022 Thank you but the second link gives a 404 on github. Not seeing what I need to do on the first link. Link to comment Share on other sites More sharing options...
MEG Venture Posted February 1, 2022 Share Posted February 1, 2022 https://github.com/PrestaShop/PrestaShop-1.6/blob/master/classes/db/DbQuery.php Please replace the file with the above one. Link to comment Share on other sites More sharing options...
egoodman Posted February 1, 2022 Author Share Posted February 1, 2022 OK replaced dbQuery.php with that and am still returning the following: Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home1/shopmichelle/public_html/classes/db/MySQL.php:51 Stack trace: #0 /home1/shopmichelle/public_html/classes/db/Db.php(319): MySQLCore->connect() #1 /home1/shopmichelle/public_html/classes/db/Db.php(239): DbCore->__construct('localhost', 'shopmich_admin', 'myrter2018', 'shopmich_shop') #2 /home1/shopmichelle/public_html/config/alias.php(66): DbCore::getInstance() #3 /home1/shopmichelle/public_html/classes/shop/Shop.php(329): pSQL('shopmichellefar...') #4 /home1/shopmichelle/public_html/config/config.inc.php(114): ShopCore::initialize() #5 /home1/shopmichelle/public_html/index.php(27): require('/home1/shopmich...') #6 {main} thrown in /home1/shopmichelle/public_html/classes/db/MySQL.php on line 51 Link to comment Share on other sites More sharing options...
MEG Venture Posted February 1, 2022 Share Posted February 1, 2022 Can you please try PHP 7.0.XX version instead of 7.1? Link to comment Share on other sites More sharing options...
Avengers Posted February 1, 2022 Share Posted February 1, 2022 For CPanel users, if you see this error and you already have PHP 5.x selected for the site, there might be a CPanel update that disabled mysql and mysqli PHP extensions. To check and enable the extensions: Go to Select PHP Version in CPanel Make sure you have PHP 5.x selected Make sure mysql and mysqli PHP extensions are checked Link to comment Share on other sites More sharing options...
egoodman Posted February 1, 2022 Author Share Posted February 1, 2022 PHP version is 7.0 now. Avengers....are you referring to the hosting CPanel? I can't get into the Prestashop panel since it's coming up as a white screen. Error currently: Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home1/shopmichelle/public_html/classes/db/MySQL.php:51 Stack trace: #0 /home1/shopmichelle/public_html/classes/db/Db.php(319): MySQLCore->connect() #1 /home1/shopmichelle/public_html/classes/db/Db.php(239): DbCore->__construct('localhost', 'shopmich_admin', 'myrter2018', 'shopmich_shop') #2 /home1/shopmichelle/public_html/config/alias.php(66): DbCore::getInstance() #3 /home1/shopmichelle/public_html/classes/shop/Shop.php(329): pSQL('shopmichellefar...') #4 /home1/shopmichelle/public_html/config/config.inc.php(114): ShopCore::initialize() #5 /home1/shopmichelle/public_html/index.php(27): require('/home1/shopmich...') #6 {main} thrown in /home1/shopmichelle/public_html/classes/db/MySQL.php on line 51 Link to comment Share on other sites More sharing options...
MEG Venture Posted February 1, 2022 Share Posted February 1, 2022 Then I guess the only solution is to go back to PHP 5.3 Link to comment Share on other sites More sharing options...
egoodman Posted February 1, 2022 Author Share Posted February 1, 2022 It's just strange that the site was working for the last 2 years plus and suddenly this issue. I'll set the PHP back to 5.3 and see what happens.... Link to comment Share on other sites More sharing options...
egoodman Posted February 1, 2022 Author Share Posted February 1, 2022 Set to5.3 and the site wouldn't even come up with errors. It asks to download? Seriously weird. I set back to 7.1 and back to: Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home1/shopmichelle/public_html/classes/db/MySQL.php:51 Stack trace: #0 /home1/shopmichelle/public_html/classes/db/Db.php(319): MySQLCore->connect() #1 /home1/shopmichelle/public_html/classes/db/Db.php(239): DbCore->__construct('localhost', 'shopmich_admin', 'myrter2018', 'shopmich_shop') #2 /home1/shopmichelle/public_html/config/alias.php(66): DbCore::getInstance() #3 /home1/shopmichelle/public_html/classes/shop/Shop.php(329): pSQL('shopmichellefar...') #4 /home1/shopmichelle/public_html/config/config.inc.php(114): ShopCore::initialize() #5 /home1/shopmichelle/public_html/index.php(27): require('/home1/shopmich...') #6 {main} thrown in /home1/shopmichelle/public_html/classes/db/MySQL.php on line 51 Link to comment Share on other sites More sharing options...
El Patron Posted February 2, 2022 Share Posted February 2, 2022 what version of PS? several versions of 1.7 had this issue maybe I missed it but this should be in your original post, i.e. ps version Link to comment Share on other sites More sharing options...
egoodman Posted February 3, 2022 Author Share Posted February 3, 2022 Version 1.6 The weird thing is the site was working for so long and suddenly funked out. 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