Prestashop: After changing hosting Back Office http error 500, Front Office OK

Created on 17 Jan 2019  Â·  5Comments  Â·  Source: PrestaShop/PrestaShop

I transfer prestashop to another hosting (i have done it many times).

After the transfer front office is working fine.
In back office i get http error 500.

Nothing in apache error log.
If i put in debug mode back office is working fine.

If disable debug mode and enable display error and i got this

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user 'r1005_esorouxa'@'159.69.224.23' (using password: YES) in /usr/www/users/eksoro/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43 Stack trace: #0 /usr/www/users/eksoro/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(43): PDO->__construct('mysql:host=db25...', 'r1005_esorouxa', 'Bo?XXXXXXXXXXX', Array) #1 /usr/www/users/eksoro/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php(44): Doctrine\DBAL\Driver\PDOConnection->__construct('mysql:host=db25...', 'r1005_esorouxa', 'Bo?XXXXXXXXXXX', Array) #2 /usr/www/users/eksoro/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(360): Doctrine\DBAL\Driver\PDOMySql\Driver->connect(Array, 'r1005_esorouxa', 'Bo?XXXXXXXXXXX', Array) #3 /usr/www/users/eksoro/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(942): Doctrine\DBAL\Connection->connect() #4 /usr/www/users/eksoro/src/PrestaShopBundle/Kernel/ModuleRepository.php(59): Doctrine\DBAL\Connection->query('SELECT name FR in /usr/www/users/eksoro/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 103

The credentials of mysql in error are from the old configuration!!!

Of Course after the transfer i update the app/config/parameters.php with the new db credentials.

I have clear cache. I have clear smarty. I have try different versions of php. I have check file permissions.

PrestaShop version: 1.7.5
PHP version: 7.2 (i try different versions 5.6 , 7.0, 7.1 , 7.3)

1.7.5.0 BO No change required

Most helpful comment

I clear manual older into var/cache (prod & dev) and problem solved.
Thank you very much.

All 5 comments

Hi @sanctusmob,

I moved my Project to a new domain without errors.

  1. I made a backup for my files & my database
  2. I uploaded my store's files to your new server
  3. I imported the old store's database to the new server
  4. In file /app/config/parameters.php, I configured my PrestaShop site.
    4.1. DB_SERVER: database's server;
    4.2. DB_NAME: Name of the database from step 5;
    4.3. DB_USER: User associated with the database;
    4.4. DB_PASSWD: The user's password;
  5. in the Table ps_shop_url, I changed with the
    5.1. domain => new domain
    5.2. domain_ssl => new domain_ssl
    5.3. physical_uri => new physical_uri
  6. I cleared cache manually by deleting all the folder into var/cache (prod & dev) => could solve your issue => you can follow this comment => https://github.com/PrestaShop/PrestaShop/issues/11000#issuecomment-429621067

Thanks to check & feedback.

I clear manual older into var/cache (prod & dev) and problem solved.
Thank you very much.

@sanctusmob, thanks for your feedback.
Feel free to open a new one when needed.
Thanks!

I can confirm i had the same error.

@espacious, you need to clear cache manually by deleting all the folder into var/cache (prod & dev).
Thanks!

Was this page helpful?
0 / 5 - 0 ratings