Leschij Posted April 17, 2016 Share Posted April 17, 2016 (edited) Hi, I just read that prestashop is now compatible with PHP 7: http://build.prestashop.com/news/prestashop-1614-maintenance-release/. However when changing to PHP 7 I get the following error message: Link to database cannot be established: SQLSTATE[HY000] [2002] No such file or directory. After changing back to PHP 5.6, everything works fine again. Does anyone have an idea, maybe I have to change some settings? I'm using InnoDB and mysqlnd 5.0.11-dev. I have a WordPress blog running on the same server which just works fine with PHP 7 so it must be PrestaShop having the issues. I would be greatful for any suggestions. Thanks a lot Leschij Edited April 17, 2016 by Leschij (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted April 17, 2016 Share Posted April 17, 2016 The problem is on your Mysql database client version in use. You should upgrade to a stable one, you are using dev. Running without problems is MySQL 5.5.43-0 (native ubuntu for ex.), and MySQL engine InnoDB with MySQL driver DbPDO, for example. Link to comment Share on other sites More sharing options...
roband Posted April 17, 2016 Share Posted April 17, 2016 I don't think this has anything to do with PrestaShop. Sounds more like the pdo_mysql PHP extension isn't configured correctly in your PHP 7 environment. If you check: php -i | grep pdo_mysql what it the value of pdo_mysql.default_socket My guess is it points to the wrong place, not where you have mysql putting its mysql.sock file pdo_mysql will use the mysql.sock connection method if the database server hostname is set to 'localhost', which it is in PrestaShop by default. 1 Link to comment Share on other sites More sharing options...
Leschij Posted April 17, 2016 Author Share Posted April 17, 2016 Hi, thank you both for the help. Indeed, I had to change the hostname. The mysql-version is actually 5.5. I got the wrong info. Have a nice day. 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