问题
After upgrade my server version (Plesk Onyx with debian) I have recreated the domain and database with all the same DB, Users and Password, but mautic show this:
The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator. System administrators, check server logs for errors.
All the necessary php modules are Active and work about pdo, pdo_mysql etc etc.

Additional Information
Mautic version | Last
PHP version | 7.2.19
Browser | Tested with all Browser
Server | Plesk Onyx Version 17.8.11 - Debian 9.9
Steps to reproduce
I have change the server. My previous server version was in CENTOS, now is DEBIAN whit the last version of Plesk Onyx.
I have made Backup of FTP and MySQL, and i have recreate the main domain and the sub domain where MAUTIC are on the root directory sub.mysite.ext.
I have reused same DB Name, DB user and Password, and the DB address is always localhost on port 3306.
I have try to cancel the Cache, but nothing.
I have try to set the right permission by console:
cd /var/www/vhost/thisismywebsite.ext/mautic.thisismywebsite.ext/
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod -R g+w app/cache/
chmod -R g+w app/logs/
chmod -R g+w app/config/
chmod -R g+w media/files/
chmod -R g+w media/images/
chmod -R g+w translations/
but again don't work
On my new server i have a new version of MySQL, 10.1.38-MariaDB-0+deb9u1 Debian 9.8
On my previous version MySql version was 5.5.60-MariaDB
Log errors
[2019-06-21 11:02:29] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\TableNotFoundException: "An exception occurred while executing 'UPDATE users SET online_status = ? WHERE last_active <= ?' with params ["offline", "2019-06-21 08:47:29"]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'admin_mmautic.users' doesn't exist" at /var/www/vhosts/thisismysite.ext/mautic.thisismysite.ext/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 53 {"exception":"[object] (Doctrine\\DBAL\\Exception\\TableNotFoundException(code: 0): An exception occurred while executing 'UPDATE users SET online_status = ? WHERE last_active <= ?' with params [\"offline\", \"2019-06-21 08:47:29\"]:\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'admin_mmautic.users' doesn't exist at /var/www/vhosts/thisismysite.ext/mautic.thisismysite.ext/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:53, Doctrine\\DBAL\\Driver\\PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'admin_mmautic.users' doesn't exist at /var/www/vhosts/thisismysite.ext/mautic.thisismysite.ext/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107, PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'admin_mmautic.users' doesn't exist at /var/www/vhosts/thisismysite.ext/mautic.thisismysite.ext/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105)"} []
[2019-06-21 11:02:29] mautic.CRITICAL: Exception thrown when handling an exception (Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'UPDATE users SET online_status = ? WHERE last_active <= ?' with params ["offline", "2019-06-21 08:47:29"]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'admin_mmautic.users' doesn't exist at /var/www/vhosts/thisismysite.ext/mautic.thisismysite.ext/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 53) {"exception":"[object] (Doctrine\\DBAL\\Exception\\TableNotFoundException(code: 0): An exception occurred while executing 'UPDATE users SET online_status = ? WHERE last_active <= ?' with params [\"offline\", \"2019-06-21 08:47:29\"]:\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'admin_mmautic.users' doesn't exist at /var/www/vhosts/thisismysite.ext/mautic.thisismysite.ext/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:53, Doctrine\\DBAL\\Driver\\PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'admin_mmautic.users' doesn't exist at /var/www/vhosts/thisismysite.ext/mautic.thisismysite.ext/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107, PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'admin_mmautic.users' doesn't exist at /var/www/vhosts/thisismysite.ext/mautic.thisismysite.ext/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105)"} []
[2019-06-21 11:02:29] mautic.ERROR: Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'UPDATE users SET online_status = ? WHERE last_active [] []
Heeelp
Please i'm going crazy. Some one can help me?
回答1:
I had faced this issue in few month before and I had update the mautic version to over come this issue.
To Update Mautic instance, please follow the below steps
First get the backup of the code (
zip -r filename.zip project folder path
).Get the database backup (
mysqldump -h host -u username -p(password) database name > projectname.sql
)Give the file permission and clear the cache. By using (
php app/console cache:clear
orrm -rf app/cache
).Check if there is any update available. By using (
php app/console mautic:update:find
).If there is any update available then update the instance.
By using (php app/console mautic:update:apply
).Now give the file permission and remove the cache again.
Now done the instance is updated and test it. That’s it.
If still you issue is not solve then you can update the mysql database schema.
To do this please follow the link https://www.mautic.org/docs/en/tips/troubleshooting.html
回答2:
I would just double check that your new system is using the same prefix for your database tables, and that they have all been moved over using the same database name.
Specifically, look in your Mautic configuration (app/config/local.php) and check the database connection details (db_host, db_name, db_port, db_user, db_password) prefix (db_table_prefix), etc and ensure they match what you're seeing in your database.
In your error logs above, it seems that you are trying to find the table:
admin_mmautic.users
The errors are telling you that this table doesn't exist.
Maybe a typo (admin_mmautic seems like an unusual prefix to me) or that before the prefix was different on your old server and did not include admin at the start?
来源:https://stackoverflow.com/questions/56700743/the-site-is-currently-offline-due-to-encountering-an-error-mautic