简体   繁体   中英

Why perstashop cannot connect to db in release mode?

I have an e-commerce site which is built by Prestashop 1.7. when my site is running under debug mode everything is ok and site and back-office work properly. but when I turn off my site debug mode my back-office start to crash and when I am navigating from dashboard main page to somewhere else like products list or setting section only an empty white page is showing. I look in my page Inspect and found that there is an Internal Server Error (500) for loading page. then I look at my site hosting log and found that there is a database connection
error:

Access denied for user 'mysite'@'localhost' (using password: YES) in /home/mysite/domains/mysite.com/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43

I look at my database connection parameters inside app/config/parameters.php but my database user name is not mysite but is mysite_dbuser . I am wondering about this changing username when site mode is modified to release mode.

I found the answer. there is two cache (prod/dev) inside var/cache directory which must de deleted after changing site debug mode.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM