Jump to content

500 Server Error


luca_p

Recommended Posts

Help, this morning I tried to log in and got this message:

500 Server Error

Oops, something went wrong.
Try to refresh this page or feel free to contact us if the problem persists.

I cannot log in or even visit my website

https://www.cosmeralda.it/
https://www.cosmeralda.com/


I do not have much information on the status of the site, which was not running the latest version of prestashop.

Link to comment
Share on other sites

I activeted debugging mode via code and now it shows this:

 

[PrestaShopException]

Link to database cannot be established: SQLSTATE[HY000] [1045] Access denied for user 'Sql1257805'@'89.46.106.155' (using password: YES)
at line 127 in file classes/db/DbPDO.php

122. public function connect() 123. { 124. try { 125. $this->link = $this->getPDO($this->server, $this->user, $this->password, $this->database, 5); 126. } catch (PDOException $e) { 127. throw new PrestaShopException('Link to database cannot be established: ' . $e->getMessage()); 128. } 129. 130. $this->link->exec('SET SESSION sql_mode = \'\''); 131. 132. return $this->link;

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

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

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

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

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

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

Link to comment
Share on other sites

a) you can contact the host

Host should try to connect manually with the current username and password provided.

b) Do it by yourself 
 

you can check the MySQL connection password by verifying the database configuration in the settings.inc.php file. Here's how you can do it:

1) Locate "settings.inc.php": Go to the root directory of your PrestaShop installation, and find the config directory. Inside it, there should be a file named "settings.inc.php".

2) Open "settings.inc.php": Open the "settings.inc.php" file using a text editor.

3) Verify Database Configuration:

Look for lines that define the database connection settings. These lines typically start with define('_DB_SERVER_', ...), define('_DB_NAME_', ...), define('_DB_USER_', ...), and define('_DB_PASSWD_', ...).

Check the value defined for '_DB_PASSWD_'. This is where the MySQL connection password is set.

4) Check MySQL Server:

Make sure that the MySQL server is running.

Verify that the MySQL user specified in '_DB_USER_' has the necessary privileges to access the database.

5) Test Connection Manually:

You can also try to connect to your MySQL server manually using the command-line interface or a tool like phpMyAdmin with the same credentials. This helps ensure that the credentials are correct.

6) Check Error Logs:

If there's still an issue, check the error logs. PrestaShop might log database connection errors in the error_log file or a separate log file.

Remember, the password should be correctly set in the settings.inc.php file and should match the credentials set for the MySQL user on the server.

Link to comment
Share on other sites

7 minutes ago, PrestaServicePro said:

a) you can contact the host

Host should try to connect manually with the current username and password provided.

b) Do it by yourself 
 

you can check the MySQL connection password by verifying the database configuration in the settings.inc.php file. Here's how you can do it:

1) Locate "settings.inc.php": Go to the root directory of your PrestaShop installation, and find the config directory. Inside it, there should be a file named "settings.inc.php".

2) Open "settings.inc.php": Open the "settings.inc.php" file using a text editor.

3) Verify Database Configuration:

Look for lines that define the database connection settings. These lines typically start with define('_DB_SERVER_', ...), define('_DB_NAME_', ...), define('_DB_USER_', ...), and define('_DB_PASSWD_', ...).

Check the value defined for '_DB_PASSWD_'. This is where the MySQL connection password is set.

4) Check MySQL Server:

Make sure that the MySQL server is running.

Verify that the MySQL user specified in '_DB_USER_' has the necessary privileges to access the database.

5) Test Connection Manually:

You can also try to connect to your MySQL server manually using the command-line interface or a tool like phpMyAdmin with the same credentials. This helps ensure that the credentials are correct.

6) Check Error Logs:

If there's still an issue, check the error logs. PrestaShop might log database connection errors in the error_log file or a separate log file.

Remember, the password should be correctly set in the settings.inc.php file and should match the credentials set for the MySQL user on the server.

config/settings.inc.php all it shows is:

<?php
//@deprecated 1.7

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