Warm tip: This article is reproduced from serverfault.com, please click

其他-WordPress会定期为cron.php,class-wp-hook.php和update.php产生错误

(其他 - WordPress regularly produces errors for cron.php, class-wp-hook.php and update.php)

发布于 2018-01-05 10:59:18

对于客户,我在WordPress中建立了一个网站。该网站遭到黑客攻击并感染了恶意代码,因此我重新上传了所有WordPress文件和主题文件,更改了所有密码,安装了安全插件,并运行了几次病毒扫描以删除每一行代码,这是可疑的。执行此操作后,该站点可以正常工作,但是现在出现以下错误:

Warning: Cannot call assert() with string argument dynamically in /mnt/web107/d1/74/58360774/htdocs/wp-includes/cron.php on line 1 Warning: call_user_func_array() expects parameter 1 to be a valid callback,
function 'wp_cron' not found or invalid function name in /mnt/web107/d1/74/58360774/htdocs/wp-includes/class-wp-hook.php on line 286
Fatal error: Uncaught Error: Call to undefined function wp_next_scheduled() in /mnt/web107/d1/74/58360774/htdocs/wp-includes/update.php:710 Stack trace: #0 /mnt/web107/d1/74/58360774/htdocs/wp-includes/class-wp-hook.php(286): wp_schedule_update_checks('')
#1 /mnt/web107/d1/74/58360774/htdocs/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 /mnt/web107/d1/74/58360774/htdocs/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /mnt/web107/d1/74/58360774/htdocs/wp-settings.php(450): do_action('init') 
#4 /mnt/web107/d1/74/58360774/htdocs/wp-config.php(126): require_once('/mnt/web107/d1/...')
#5 /mnt/web107/d1/74/58360774/htdocs/wp-load.php(37): require_once('/mnt/web107/d1/...')
#6 /mnt/web107/d1/74/58360774/htdocs/wp-blog-header.php(13): require_once('/mnt/web107/d1/...')
#7 /mnt/web107/d1/74/58360774/htdocs/index.php(22): require('/mnt/web107/d1/...')
#8 {main} thrown in /mnt/web107/d1/74/58360774/htdocs/wp-includes/update.php on line 710 

奇怪的是,当错误出现时,我只需要重新上传所有WordPress核心文件,网站又可以正常工作几个星期,然后错误再次出现。

有人可以解释一下导致这些错误的原因以及如何解决这些错误吗?我搜索了错误,但找不到修复程序。

Questioner
Mario
Viewed
11
DaRo 2018-01-05 19:48:25

检查你服务器的cron任务,它必须在那里尝试执行某件事,这就是导致错误的原因。

抱歉,没有具体说明,但是每个托管公司都有自己的小组。

问候,丹尼尔