升级我的服务器版本后(Plesk Onyx 和 debian)我用所有相同的数据库、用户和密码重新创建了域和数据库,但是 mautic 显示这个:
由于遇到错误,该网站目前处于离线状态。如果问题仍然存在,请联系系统管理员。系统管理员,检查服务器日志是否有错误。
所有必要的 php 模块都处于事件状态,并且可以处理 pdo、pdo_mysql 等。
附加信息
马蒂奇版本 |最后
PHP版本| 7.2.19
浏览器 |使用所有浏览器测试
服务器 | Plesk Onyx 版本 17.8.11 - Debian 9.9
重现步骤
我换了服务器。我以前的服务器版本是 CENTOS,现在是 DEBIAN 和最新版本的 Plesk Onyx。
我已经备份了 FTP 和 MySQL,我已经重新创建了 MAUTIC 在根目录 sub.mysite.ext 上的主域和子域。
我重复使用了相同的数据库名称、数据库用户和密码,并且数据库地址始终是端口 3306 上的本地主机。
我试过取消缓存,但是没有。
我尝试通过控制台设置正确的权限:
cd/var/www/vhost/thisismywebsite.ext/mautic.thisismywebsite.ext/
寻找 。 -type d -exec chmod 755 {}\;
寻找 。 -type f -exec chmod 644 {}\;
chmod -R g+w 应用/缓存/
chmod -R g+w 应用程序/日志/
chmod -R g+w 应用程序/配置/
chmod -R g+w 媒体/文件/
chmod -R g+w 媒体/图像/
chmod -R g+w 翻译/
但还是不行
在我的新服务器上,我有一个新版本的 MySQL,10.1.38-MariaDB-0+deb9u1 Debian 9.8
在我之前的版本中,MySql 版本是 5.5.60-MariaDB
记录错误
[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 [] []
帮助
拜托我要疯了。有人可以帮助我吗?
最佳答案
有时这是由于服务器权限问题,Mautic 需要实例服务器文件的写权限,
- 授予写入权限
- 清除缓存
php app/console cache:clear
- 再次授予权限
- 刷新仪表板页面
它会很好地工作。
或
如果上述过程没有解决问题,那么您必须更新 Mautic 版本以解决此问题。
要更新Mautic实例,请按照以下步骤操作
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.
如果您的问题仍然没有解决,那么您可以更新mysql 数据库架构。
为此,请点击链接 https://www.mautic.org/docs/en/tips/troubleshooting.html
关于php - 由于遇到错误,该网站目前处于离线状态 - Mautic,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56700743/