seanr22a Posted April 26, 2018 Share Posted April 26, 2018 I want to upgrade from PHP 5.6 to PHP7 on my server but doing so I get 500 Internal Server Error in both front and back office. Turning on debug I see this: Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /volume1/web/prestashop/classes/db/MySQL.php:51 Stack trace: #0 /volume1/web/prestashop/classes/db/Db.php(319): MySQLCore->connect() #1 /volume1/web/prestashop/classes/db/Db.php(239): DbCore->__construct('127.0.0.1:3307', 'root', 'xxxxxxxxxxxxxxx', 'prestashop') #2 /volume1/web/prestashop/config/alias.php(66): DbCore::getInstance() #3 /volume1/web/prestashop/classes/shop/Shop.php(329): pSQL('www.mysite.com') #4 /volume1/web/prestashop/config/config.inc.php(114): ShopCore::initialize() #5 /volume1/web/prestashop/adminxxxxxxxx/index.php(36): require('/volume1/web/pr...') #6 {main} thrown in /volume1/web/prestashop/classes/db/MySQL.php on line 51 I went back to PHP5.6 again and everything running fine. Any ideas ? Link to comment Share on other sites More sharing options...
bellini13 Posted April 27, 2018 Share Posted April 27, 2018 the mysql driver is no longer supported in PHP 7. you will need to ensure that either the pdo_mysql or mysqli extensions are installed and enabled for your PHP 7 installation. you should work directly with your hosting provider if you are unable to do this yourself. 1 Link to comment Share on other sites More sharing options...
seanr22a Posted May 3, 2018 Author Share Posted May 3, 2018 On 4/27/2018 at 1:33 PM, bellini13 said: the mysql driver is no longer supported in PHP 7. you will need to ensure that either the pdo_mysql or mysqli extensions are installed and enabled for your PHP 7 installation. you should work directly with your hosting provider if you are unable to do this yourself. I finaly got the time to try your suggestion. I enabled the same extensions in PHP7 as in PHP5.6 and now it's working! Many thanks for pointing me in the right direction. Link to comment Share on other sites More sharing options...
ozseals_sonny Posted January 23, 2019 Share Posted January 23, 2019 hi seanr22a I just have a issues like you, could you help me show what extensions on PHP7 that you enabled. Thank you so much Link to comment Share on other sites More sharing options...
ctcamp Posted February 3, 2021 Share Posted February 3, 2021 Thank you. Appreciated that you took the time to address this 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