更新时Wordpress数据库连接错误

时间:2017-01-10 12:09:20

标签: php wordpress

大家好我把我的WordPress(错误地)更新为4.7,所有从db获取数据的页面都搞砸了。

我可以恢复原来的版本,但我想继续使用wp 4.7并修复此错误....

用谷歌搜索这个词 p3pnexwpnas 我发现这种情况发生了

请查看一些错误Fatal error: Uncaught exception 'Exception' with message 'fetch - <b></b><br>---<br> Query: select * from wp_22v51hy4p7_revslider_settings' in /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/framework/functions.class.php:7 Stack trace: #0 /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/framework/db.class.php(22): UniteFunctionsRev::throwError('fetch - <b></b>...', -1) #1 /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/framework/db.class.php(36): UniteDBRev->throwError('fetch - <b></b>...') #2 /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/framework/db.class.php(127): UniteDBRev->checkForErrors('fetch') #3 /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/revslider_params.class.php(42): UniteDBRev->fetch('wp_22v51hy4p7_r...') #4 /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/revslider_op in /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/framework/functions.class.php on line 7

这也是其他页面上的错误: -

Notice: Constant DB_NAME already defined in     /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-config.php on line 23

Notice: Constant DB_USER already defined in /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-config.php on line 26

Notice: Constant DB_PASSWORD already defined in /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-config.php on line 29

Notice: Constant DB_HOST already defined in /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-config.php on line 32

Notice: Constant DB_CHARSET already defined in /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-config.php on line 35

任何提示解决这个问题都将不胜感激.....

2 个答案:

答案 0 :(得分:1)

Wordpress安装和数据库中没有错误。 问题是有一些插件与wordpress 4.7不兼容。

看看第一个错误。

  

致命错误:未捕获的异常&#39;异常&#39;消息&#39;获取 -   查询:从wp_22v51hy4p7_revslider_settings&#39;中选择*在   /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/framework/functions.class.php:7   堆栈跟踪:#0

这是因为revslider plugin与你当前版本的wordpress不兼容,这就是为什么它会抛出致命的错误。因此,如果想继续使用wordpress,请删除与wordpress版本不兼容的所有插件,否则请更新它。

答案 1 :(得分:0)

终于找到了答案......

所以有2个问题

  1. 已弃用的插件错误
  2. 使用include,因此它正在加载wp-config文件两次
  3. 使用旧的开发包括包括wp-config,这是已定义的常量即将到来的原因。我使用了require_once,这个问题解决了。

    感谢插件帮助人....