
php.ini里面默认是display_errors = Off
可以设置On后再访问,这样会把错误信息打印出来,方便定位问题
排查:
1、检查服务都是正常运行的
#代码目录:/data/hosts/web/wwwroot/
#日志目录:/data/log
#数据库日志:/var/log/mysqld.log
#nginx配置文件:/etc/nginx/conf.d/ 分别有网站和wordpress后台网站配置文件2、什么都没有动,配置文件也是没有动,突然异常了
3、浏览器访问超时,并没有明显报错,此时需要调试php debug报错
#修改文件:/data/hosts/web/wwwroot/wp-config.php
#将define('WP_DEBUG', off); 改为define('WP_DEBUG', true);
#在刚修改的下面一行加上ini_set('display_errors','On');
#重启php
systemctl restart php-fpm.service
#在浏览器刷新查看,错误就会输出浏览器报错:Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /data/hosts/web/wwwroot/wp-includes/functions.php on line 2991
4、检查报错代码文件
/data/hosts/web/wwwroot/wp-includes/functions.php

发现上面多余了好多代码,判断出 代码被注入了,删除上面的恶意注入后打开正常了。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。