Jump to content

[PrestaShopException]


prestadix

Recommended Posts

Saudações a todos,

Desde há mais de uma semana que o meu site deixou de estar disponível. Num dia funcionava normalmente, no outro deixou de funcionar!

Inicialmente informava o erro 500, ativando o modo de depuração apresentava um erro, que já me recordo qual era, e que me obrigou a procurar nos fóruns uma possível solução.

Segui várias dicas que não resultaram, no entanto, é possível que algo tenha alterado, pois agora o erro que aparece é diferente do inicial. É possível que tenha alterado alguma coisa inadvertidamente, não tenho conhecimentos no assunto.

Isto é uma VPS na OVH e a minha versão do Prestashop é 1.6, PHP 5.6.

Este é o seguinte erro que agora surge, se não estou errado, parece que as credenciais de acesso à base de dados estão erradas, digo eu! No entanto, verifiquei no ficheiro settings.inc e aparentemente lá está correto.

Curioso é que, também deixei de ter acesso ao phpMyAdmin, mesmo inserindo as credenciais como sempre.

Abaixo transcrevo o erro que surge:

[PrestaShopException]

Link to database cannot be established:SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
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.');

DbPDOCore->connect - [line 319 - classes/db/Db.php]

DbCore->__construct - [line 240 - classes/db/Db.php] - [4 Arguments]

DbCore::getInstance - [line 66 - config/alias.php]

pSQL - [line 329 - classes/shop/Shop.php] - [1 Arguments]

ShopCore::initialize - [line 114 - config/config.inc.php]

require - [line 36 - admin/index.php] - [1 Arguments]

 

O que poderá estar a acontecer? Alguém seria capaz de me ajudar por favor?

Não sei mais o que possa fazer!

Agradeço toda a ajuda possível, obrigado!

 

Link to comment
Share on other sites

Hola,

Sí, parece que la conexión a la base de datos no funciona correctamente.

Póngase en contacto con el alojamiento y pregunte si algo ha cambiado.

Que tengas un lindo día.

Atentamente,
Leo

================================

Hi,

Yes, it seems that the database connection is not working properly.

Contact the hosting and ask if something has changed.

Have a nice day.

Kind regards,
Leo

Edited by Prestachamps (see edit history)
Link to comment
Share on other sites

10 horas atrás, Prestachamps disse:

Hola,

Sí, parece que la conexión a la base de datos no funciona correctamente.

Póngase en contacto con el alojamiento y pregunte si algo ha cambiado.

Que tengas un lindo día.

Atentamente,
Leo

================================

Hi,

Yes, it seems that the database connection is not working properly.

Contact the hosting and ask if something has changed.

Have a nice day.

Kind regards,
Leo

Hello, thanks for the reply.
Yes, I've already done that, but my server is an OVH VPS and they don't support this case, they mentioned that a PING was done to the server and that it's working normally, that's a problem to solve with the website developer, in this case it was me, so my problem for lack of knowledge.
Thanks!

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