繁体   English   中英

表'mdl_sessions'在Moodle中不存在

[英]Table 'mdl_sessions' doesn't exist in Moodle

我的网站网站显示“从数据库读取错误”
在config.php中激活调试后,错误显示名称为“ mdl_session”的表在数据库中不存在

错误消息是:

Debug info: Table 'mniknami_edu.mdl_sessions' doesn't exist
SELECT id, sid, state, userid, lastip, timecreated, timemodified FROM mdl_sessions     WHERE sid = ?
[array (
0 => 'lhdasq4iscedtqhvbs5j1lq833',
)]
Error code: dmlreadexception
Stack trace:    

line 441 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 996 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1415 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
line 1387 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
line 1366 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 268 of /lib/classes/session/manager.php: call to moodle_database->get_record()
line 79 of /lib/classes/session/manager.php: call to core\session\manager::initialise_user_session()
line 806 of /lib/setup.php: call to core\session\manager::start()
line 35 of /config.php: call to require_once()
line 27 of /login/index.php: call to require()

我的心情在2天前正常工作,此后,我没有进行任何更改或更新
为什么会出现此问题,我该如何解决?
我的心情版本是2.6.1+

Moodle会话可以存储在不同的位置:数据库,文件,内存缓存。 根据https://docs.moodle.org/en/Session_handling的规定,“ [files]驱动程序在新安装中默认使用”。

也许是这种情况,但是最近config.php中发生了一些变化,Moodle现在正在尝试使用数据库进行会话?

在一个旁注中,使用memcached进行会话会对性能产生巨大的影响(如Moodle的Wiki所述),但是需要在config.php中进行配置。 如果您有可用的Memcached,则可以解决此问题并使站点更快。

我遇到了同样的问题。 检查分区中的可用空间是否不足。 如果这样,给它更多的空间或清理未使用的文件等。如果可以的话,在mysql中关闭二进制日志,这些日志可能会变得很大。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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