Jump to content

Prestashop 1.6.1.4 issues after changing to PHP 7


Leschij

Recommended Posts

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 by Leschij (see edit history)
Link to comment
Share on other sites

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. 

  • Like 1
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...