如何解决Wordpress 404错误页面中的致命错误?

时间:2018-09-06 18:33:53

标签: php wordpress

无论何时我/任何用户遇到错误页面,这都向我显示:

Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in /home/exampdte/public_html/wp-content/plugins/permalink-finder_bak/includes/pf-404.php:621 
Stack trace: 
    #0 /home/exampdte/public_html/wp-content/plugins/permalink-finder_bak/includes/pf-404.php(428): kpg_find_permalink_post_exact('expected-questi...', '2', 'N', 'N', 'N') 
    #1 /home/exampdte/public_html/wp-content/plugins/permalink-finder_bak/permalink-finder.php(37): kpg_permalink_fixer() 
    #2 /home/exampdte/public_html/wp-includes/class-wp-hook.php(286): kpg_permalink_finder('') 
    #3 /home/exampdte/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) 
    #4 /home/exampdte/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) 
    #5 /home/exampdte/public_html/wp-includes/template-loader.php(12): do_action('template_redire...') 
    #6 /home/exampdte/public_html/wp-blog-header.php(19): require_once('/home/exampdte/...') 
    #7 /home/exampdte/public_html/index.php(17): require('/home/exampdte/...') 
    #8 {main} thrown in /home/exampdte/public_html/wp-content/plugins/permalink-finder_bak/includes/pf-404.php on line 621

1 个答案:

答案 0 :(得分:1)

如果您查看错误消息,它会告诉您确切的情况,让我们对其进行分解:

Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string()

这意味着您遇到致命错误(因此当前请求将在此处终止/停止),致命错误为undefined function mysql_real_escape_string(),这意味着该功能不存在。

在堆栈跟踪中,您可以看到/home/exampdte/public_html/wp-content/plugins/permalink-finder_bak/includes/pf-404.php:621,这意味着该文件在行621上存在问题。

mysql_real_escape_string()(以及其余mysql_函数)已被弃用,并替换为mysqli_real_escape_string()和相关的mysqli_函数。

因此,您要么拥有permalink-finder_bak插件的过时版本,要么如果他们停止维护它,则需要停用它。