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 DoctrineDBALExceptionTableNotFoundException: "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"]:nnSQLSTATE[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 (DoctrineDBALExceptionTableNotFoundException: 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"]:nnSQLSTATE[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: DoctrineDBALExceptionTableNotFoundException: An exception occurred while executing 'UPDATE users SET online_status = ? WHERE last_active [] []
Heeelp
Please i’m going crazy. Some one can help me?
2
Answers
Some times this is due to server permission issue, Mautic need write permission for the instance’s server file so,
php app/console cache:clear
It will work fine.
OR
If the issue is not solved with the above process then you have to update the Mautic version to over come this issue.
To Update Mautic instance, please follow the below steps
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
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?