Jump to content

Prestashop 1.7.5.1


Recommended Posts

I am getting the below error after doing an upgrade when trying to log in to the BO. 

The front end shows a 500 error.

Initially I did the upgrade using 1click upgrade and that broke the site with a 500 error. I then tried to do an upgrade using Plesk and recieved the below. 

Can anyone please help?  

 

 

[PrestaShopException]

Link to database cannot be established:SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
at line 102 in file classes/db/DbPDO.php

97.     public function connect()
98.     {
99.         try {
100.             $this->link = $this->_getPDO($this->server, $this->user, $this->password, $this->database, 5);
101.         } catch (PDOException $e) {
102.             throw new PrestaShopException('Link to database cannot be established:'.$e->getMessage());
103.         }
104. 
105.         // UTF-8 support
106.         if ($this->link->exec('SET NAMES \'utf8\'') === false) {
107.             throw new PrestaShopException('PrestaShop Fatal error: no utf-8 support. Please check your server configuration.');
Link to comment
Share on other sites

  • razaro changed the title to Prestashop 1.7.5.1

This error has been reported on many occasions, but unfortunately until now the developers team was unable to reproduce it, let alone correct it.

I don't know if that helps, but you can try the following:

  1. Open /app/config/parameters.php

Change line 4 (first line of the array)

'database_host' => '127.0.0.1',

to

'database_host' => 'localhost',

If the error message reappears you should check if the database settings shown in this file are really the same like before the upgrade.

Notice (If you upgraded from 1.6x): You will find the settings of PrestaShop 1.6 slightly different coded  in /config/settings.inc.php

 

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...