我用wordpress建立了一个网站,该网站最近已停止工作。我无法使用他的Wp-Admin页面登录。登录时,出现以下错误,列在下面的代码中。
我想知道它是否可能是导致问题的rev滑块。我已经更新了基类admin.php文件,将private static $arrMetaBoxes = '';
更改为private static $arrMetaBoxes = array();
。不幸的是,这没有用。
Fatal error: Uncaught Error: Call to undefined function mysql_error() in /home3/epicccon/public_html/sophia/wp-content/plugins/revslider/inc_php/framework/db.class.php:29 Stack trace: #0 /home3/epicccon/public_html/sophia/wp-content/plugins/revslider/inc_php/framework/db.class.php(127): UniteDBRev->checkForErrors('fetch') #1 /home3/epicccon/public_html/sophia/wp-content/plugins/revslider/inc_php/revslider_params.class.php(42): UniteDBRev->fetch('wp_xiht_revslid...') #2 /home3/epicccon/public_html/sophia/wp-content/plugins/revslider/inc_php/revslider_operations.class.php(1072): RevSliderParams->getFieldFromDB('general') #3 /home3/epicccon/public_html/sophia/wp-content/plugins/revslider/revslider_front.php(30): RevOperations::getGeneralSettingsValues() #4 /home3/epicccon/public_html/sophia/wp-includes/plugin.php(525): RevSliderFront->onAddScripts('') #5 /home3/epicccon/public_html/sophia/wp-includes/script-loader.php(1049): do_action('wp_enqueue_scri...') #6 /home3/epicccon/public_html/sophia/wp-includes/plugin.php(525): wp in /home3/epicccon/public_html/sophia/wp-content/plugins/revslider/inc_php/framework/db.class.php on line 29
Warning: Parameter 1 to W3_Plugin_TotalCache::ob_callback() expected to be a reference, value given in /home3/epicccon/public_html/sophia/wp-includes/functions.php on line 3570
答案 0 :(得分:0)
没有其他原因使PHP 7.0+停止支持mysql_ *函数,包括mysql_connect(),mysql_error(),...也许您的托管服务提供商在没有引起您注意的情况下升级到PHP 7.x。
请考虑将代码库升级到最新版本:WordPress,主题,插件。另一个 bad 选项已被降级为PHP 5.x。
向托管服务提供商咨询他们的建议。
答案 1 :(得分:0)
您将需要更新革命滑块插件的源代码。 编辑 wp-content/plugins/revslider/inc_php/framework/db.class.php 找到 checkForErrors 函数并替换下面的代码
if(mysql_error()){
与
if($this->wpdb->last_error){