{"id":54,"date":"2022-04-18T12:24:00","date_gmt":"2022-04-18T04:24:00","guid":{"rendered":"http:\/\/www.cnee.com.cn\/wp\/?p=54"},"modified":"2022-05-09T12:26:03","modified_gmt":"2022-05-09T04:26:03","slug":"moodle%e7%9a%84%e4%bc%9a%e8%af%9d%e9%94%81","status":"publish","type":"post","link":"http:\/\/www.cnee.com.cn\/wp\/?p=54","title":{"rendered":"MOODLE\u7684\u4f1a\u8bdd\u9501"},"content":{"rendered":"\n
\u672c\u6587\u4ecb\u7ecd\u5728Moodle\uff08\u9b54\u706f\uff09\u5f00\u53d1\u4e2d\u5982\u4f55\u5904\u7406\u4f1a\u8bdd\u9501\u3010session locks\u3011\u3002<\/p>\n\n\n\n
\u5f53\u4f60\u521b\u5efa\u4e00\u4e2a\u666e\u901a\u7684moodle\u9875\u9762\u5e76\u5305\u542bconfig.php\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5728php\u8fd0\u884c\u5927\u91cfmoodle\u5f15\u5bfc\u4ee3\u7801\u540e\uff0c\u5c06\u62e5\u8bbe\u7f6e\u597d\u4e00\u4e2a\u540d\u4e3a$SESSION\u5168\u5c40\u53d8\u91cf\u3002\u8fd9\u662f\u4e00\u4e2a\u5b89\u5168\u7684\u542f\u52a8\u5047\u8bbe\uff0c\u4f46\u5728\u7f16\u5199\u66f4\u9ad8\u6027\u80fd\u7684\u4ee3\u7801\u65f6\uff0c\u6700\u597d\u5c3d\u53ef\u80fd\u51cf\u5c11\u6216\u6d88\u9664\u4f1a\u8bdd\u9501\u3002<\/p>\n\n\n\n
\u5982\u679c\u4f60\u53d1\u73b0\u8bbf\u95ee\u67d0\u4e2a\u9875\u9762\u65f6\u7279\u522b\u6162\uff0c\u5728\u5bf9\u505a\u4e86\u5206\u6790\u4e4b\u540e\uff0c\u53d1\u73b0\u6b63\u5728\u7b49\u5f85\u4e00\u4e2a\u9501\u91ca\u653e\uff0c\u90a3\u4e48\u8fd9\u53ef\u80fd\u662f\u4e00\u4ef6\u5f88\u5bb9\u6613\u4fee\u590d\u7684\u4e8b\u60c5\uff0c\u53ef\u4ee5\u63d0\u9ad8\u4f60\u7684\u6574\u4f53\u6027\u80fd\u3002<\/p>\n\n\n\n
$CFG->debugsessionlock=5\uff1b\/\/\u4ee5\u79d2\u4e3a\u5355\u4f4d\u7684\u65f6\u95f4<\/code><\/pre>\n\n\n\n\u5f53\u4e00\u4e2a\u4f1a\u8bdd\u88ab\u9501\u5b9aN\u79d2\u4ee5\u4e0a\u65f6\uff0c\u5c06\u8fdb\u884c\u4e00\u6b21\u8c03\u8bd5\u8c03\u7528\uff0c\u8be6\u7ec6\u8bf4\u660e\u54ea\u4e2a\u9875\u9762\u5728\u6b63\u5728\u9501\u5b9a\u3002<\/p>\n\n\n\n
2 \u4f1a\u8bdd\u89e3\u9501\u3010unlocking\u3011<\/h2>\n\n\n\n\n\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cmoodle\u5185\u6838\u3010core\u3011\u5047\u8bbe\u60a8\u53ef\u80fd\u9700\u8981\u4fee\u6539$SESSION\u5bf9\u8c61\uff0c\u6240\u4ee5\u5b83\u5c06\u5728\u4f1a\u8bdd\u4e0a\u4fdd\u6301\u9501\uff0c\u76f4\u5230\u9875\u9762\u5904\u7406\u5b8c\u6210\u65f6\u7531shutdown handle\u91ca\u653e\u4f1a\u8bdd\u9501\u3002\u5982\u679c\u60a8\u6b63\u5728\u5904\u7406\u53ef\u80fd\u957f\u65f6\u95f4\u8fd0\u884c\u7684\u9875\u9762\uff0c\u90a3\u4e48\u60a8\u5e94\u8be5\u5bf9\u4ee3\u7801\u505a\u6e05\u6670\u7684\u5206\u79bb\uff0c\u628a\u9700\u8981\u4fee\u6539\u4f1a\u8bdd\u7684\u4ee3\u7801\u548c\u9700\u8981\u957f\u65f6\u95f4\u8fd0\u884c\u7684\u4ee3\u7801\u5206\u79bb\u5f00\u6765\uff0c\u5e76\u5728\u4fee\u6539\u4f1a\u8bdd\u540e\u89e3\u9501\u4f1a\u8bdd\u3002<\/p>\n<\/div><\/div>\n\n\n\n
\\core\\session\\manager::write_close()\uff1b<\/code><\/pre>\n\n\n\n3 \u9875\u9762\u4e2d\u7684\u53ea\u8bfb\u4f1a\u8bdd\u3010read only session\u3011<\/h2>\n\n\n\n
\u8981\u4f7f\u53ea\u8bfb\u4f1a\u8bdd\u8d77\u4f5c\u7528\uff0c\u5fc5\u987b\u542f\u7528\u53ea\u8bfb\u4f1a\u8bdd\uff0c\u5e76\u4e14\u9700\u8981\u60a8\u7684\u4ee3\u7801\u6765\u652f\u6301\u5b83\u3002<\/p>\n\n\n\n
\u5982\u679c\u4f60\u63d0\u524d\u77e5\u9053\u4f60\u6c38\u8fdc\u4e0d\u4f1a\u6539\u53d8\u4f1a\u8bdd\uff0c\u4f46\u4f60\u4ecd\u7136\u9700\u8981\u80fd\u591f\u8bfb\u4f1a\u8bdd\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u5c06\u4f60\u7684\u9875\u9762\u58f0\u660e\u4e3a\u53ea\u8bfb\u4f1a\u8bdd\u3002\u8fd9\u610f\u5473\u7740\u60a8\u7684\u9875\u9762\u6c38\u8fdc\u4e0d\u4f1a\u5728\u53e6\u4e00\u4e2ahttp\u8bf7\u6c42\u4e2d\u963b\u6b62\u4f1a\u8bdd\u3002<\/p>\n\n\n\n
define('READ_ONLY_SESSION', true);<\/code><\/pre>\n\n\n\n4 web\u670d\u52a1\u4e2d\u7684\u53ea\u8bfb\u4f1a\u8bdd<\/h2>\n\n\n\n
\u5728web\u670d\u52a1\u4e2d\u4e5f\u662f\u5982\u6b64\u3002\u58f0\u660eweb\u670d\u52a1\u65f6\uff0c\u53ef\u4ee5\u6307\u5b9a\u5b83\u4e0d\u9700\u8981\u4f1a\u8bdd\u9501\uff1a<\/p>\n\n\n\n
5 \u5b8c\u5168\u4e0d\u7528\u4f1a\u8bdd<\/h2>\n\n\n\n
\u5982\u679c\u60a8\u7684\u4ee3\u7801\u5b8c\u5168\u4e0d\u9700\u8981\u8bbf\u95ee$SESSION\uff0c\u90a3\u4e48\u53ef\u4ee5\u58f0\u660e\uff1a<\/p>\n\n\n\n
define('NO_MOODLE_COOKIES', true);<\/code><\/pre>\n\n\n\n6 \u4e0d\u9700\u8981\u914d\u7f6e<\/h2>\n\n\n\n\n\u66f4\u6781\u7aef\u7684\u4e00\u79cd\u60c5\u51b5\uff0c\u5982\u679c\u60a8\u751a\u81f3\u4e0d\u9700\u8981\u8fd0\u884c\u5b8c\u6574\u7684moodle\u5f15\u5bfc\u4ee3\u7801\uff0c\u90a3\u4e48\u60a8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8df3\u8fc7\u5b83\uff1a<\/p>\n<\/div><\/div>\n\n\n\n
define('ABORT_AFTER_CONFIG', true);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"\u672c\u6587\u4ecb\u7ecd\u5728Moodle\uff08\u9b54\u706f\uff09\u5f00\u53d1\u4e2d\u5982\u4f55\u5904\u7406\u4f1a\u8bdd\u9501\u3010session locks\u3011\u3002 \u7ee7\u7eed\u9605\u8bfb