今天Typecho突然无法登陆后台了,其他一切正常,包括评论、浏览。登陆后台会提示:
502 Bad Gateway
打开log,可以看到一些报错:
|
1 2 3 4 5 6 7 8 9 10 11 |
thrown in /www/wwwroot/www.xxxxxx.cn/var/Widget/Abstract/Contents.php on line 773" while reading response header from upstream, client: 222.135.25.175, server: www.xxxxxx.cn, request: "GET /htdocs.rar HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-74.sock:", host: "www.xxxxxx.cn" 2024/01/25 20:13:55 [error] 4906#0: *53228 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to a member function format() on null in /www/wwwroot/www.xxxxxx.cn/var/Widget/Abstract/Contents.php:773 Stack trace: #0 /www/wwwroot/www.xxxxxx.cn/usr/themes/initial/header.php(17): Widget_Abstract_Contents->date() #1 /www/wwwroot/www.xxxxxx.cn/var/Widget/Archive.php(1937): require('/www/wwwroot/ww...') #2 /www/wwwroot/www.xxxxxx.cn/usr/themes/initial/404.php(2): Widget_Archive->need() #3 /www/wwwroot/www.xxxxxx.cn/var/Widget/Archive.php(2022): require_once('/www/wwwroot/ww...') #4 /www/wwwroot/www.xxxxxx.cn/var/Widget/ExceptionHandle.php(27): Widget_Archive->render() #5 /www/wwwroot/www.xxxxxx.cn/var/Typecho/Common.php(240): Widget_ExceptionHandle->__construct() #6 [internal function]: Typecho_Common::exceptionHandle() #7 {main} |
这主要是插件的问题,某个插件出问题了,当然,不同人可能出问题的插件不同,最好的方法是关闭所有的插件,然后重新启用就好了。
此时无法登陆后台,需要打开数据库进行操作:
打开typecho_options这个表,找到plugins这个字段,正常里面是有一堆的插件信息,我们把它改成:
a:0:{}
重新打开网站即可~

马春杰杰



最新评论
站长您好,亚马逊云咨询推广资源,望建立联系,可邮件,谢谢。
换友情链接吗?
看你的站做的挺不错的
恭喜!!太强了,硕博连读啊
雁过留毛,人过留名。
看不懂但大受震撼
每天都在战争,希望2026和平.
ZeroTier 看过多篇帖子,目前群辉、飞牛os、win11 、安卓、ubuntu ≥18.04 顺利通过,这篇相对于简单 实用、特来感谢 🙄