luca_p Posted November 27, 2023 Share Posted November 27, 2023 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 websitehttps://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 More sharing options...
ComGrafPL Posted November 27, 2023 Share Posted November 27, 2023 Enable debug mode. Any theme/modules updates before issues? Link to comment Share on other sites More sharing options...
luca_p Posted November 27, 2023 Author Share Posted November 27, 2023 3 minutes ago, ComGrafPL said: Enable debug mode. Any theme/modules updates before issues? I have not used the site since friday and it was ok, how do I enable debug mode if I cannot login? Link to comment Share on other sites More sharing options...
juanrojas Posted November 27, 2023 Share Posted November 27, 2023 hello. Have you tried deleting the cache via FTP? activate debugging mode via FTP Link to comment Share on other sites More sharing options...
luca_p Posted November 27, 2023 Author Share Posted November 27, 2023 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 More sharing options...
juanrojas Posted November 27, 2023 Share Posted November 27, 2023 Verify that the username, password and database name match your connection Link to comment Share on other sites More sharing options...
luca_p Posted November 27, 2023 Author Share Posted November 27, 2023 5 minutes ago, juanrojas said: hello. Have you tried deleting the cache via FTP? activate debugging mode via FTP how can I do that? Link to comment Share on other sites More sharing options...
ComGrafPL Posted November 27, 2023 Share Posted November 27, 2023 Check and verify in phpmyadmin ( hosting panel ) with app/config/parameters.php Link to comment Share on other sites More sharing options...
luca_p Posted November 27, 2023 Author Share Posted November 27, 2023 27 minutes ago, juanrojas said: Verify that the username, password and database name match your connection I don't know how to do that Link to comment Share on other sites More sharing options...
luca_p Posted November 27, 2023 Author Share Posted November 27, 2023 3 minutes ago, ComGrafPL said: Check and verify in phpmyadmin ( hosting panel ) with app/config/parameters.php OK I opened the file what should I check? Link to comment Share on other sites More sharing options...
PrestaServicePro Posted November 27, 2023 Share Posted November 27, 2023 Also, check whether the MySQL connection password is correct or not. Link to comment Share on other sites More sharing options...
luca_p Posted November 27, 2023 Author Share Posted November 27, 2023 1 minute ago, PrestaServicePro said: Also, check whether the MySQL connection password is correct or not. how do I check that? Link to comment Share on other sites More sharing options...
luca_p Posted November 27, 2023 Author Share Posted November 27, 2023 it could be that the database expiry date was Data expiry date: 26/11/2023 but the status is set to ACTIVE what should I do? Link to comment Share on other sites More sharing options...
PrestaServicePro Posted November 27, 2023 Share Posted November 27, 2023 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 More sharing options...
luca_p Posted November 27, 2023 Author Share Posted November 27, 2023 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 More sharing options...
PrestaServicePro Posted November 27, 2023 Share Posted November 27, 2023 We'd be happy to assist you with debugging the issue. if you are open, feel free to send us a personal message with any relevant information 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