I am in big trouble. I installed a nulled version of woocommerce cart based shipping plugin and i found it not relevant according to my requiremnet and deleted that plugin from plugins area. After deleting that plugin my site went down. Its continuously showing me Fatal error:
我有大麻烦了。我安装了一个无效版本的基于woocommerce cart的传送插件,我发现它与我的requiremnet无关,并从插件区删除了那个插件。删除那个插件后,我的网站就垮了。它不断地向我显示致命的错误:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/dev/public_html/new/wp-includes/wp-db.php:1570 Stack trace: #0 /home/dev/public_html/new/wp-includes/wp-db.php(658): wpdb->db_connect() #1 /home/dev/public_html/new/wp-includes/load.php(404): wpdb->__construct('dev_test', '3CrSPh8o766F', 'dev_test_ne...', 'localhost') #2 /home/dev/public_html/new/wp-settings.php(107): require_wp_db() #3 /home/dev/public_html/new/wp-config.php(82): require_once('/home/dev/p...') #4 /home/dev/public_html/new/wp-load.php(37): require_once('/home/dev/p...') #5 /home/dev/public_html/new/wp-blog-header.php(13): require_once('/home/dev/p...') #6 /home/dev/public_html/new/index.php(17): require('/home/dev/p...') #7 {main} thrown in /home/dev/public_html/new/wp-includes/wp-db.php on line 1570
致命错误:未捕获错误:调用/home/dev/public_html/new/wp-include /wp-db中的未定义函数mysql_connect()。php:1570堆栈跟踪:#0 /home/dev/public_html/new/wp-include /wp-db.php(658): wpdb->db_connect() #1 /home/dev/public_html/new/wp-include /load.php(404): wpdb->__construct('dev_test', '3CrSPh8o766F', 'dev_test_ne…第2 /home/dev/public_html/new/wp-settings.php(107): require_wp_dev / db() #3 /home/ public_html/new/wp-config.phpphp在第1570行
I tried replacing all core files excluding wp-config.php and wp-content folder. Still I am getting the same error.
我尝试替换所有核心文件,不包括wp-config。php和wp-content文件夹。我还是得到了同样的错误。
Also, i tried renameing plugins folder but the error is there.
另外,我尝试了重新命名插件文件夹,但是错误就在那里。
Can you guys suggest me how i can get my site back.
你们能告诉我怎样才能把我的网站弄回来吗?
3 个解决方案
#1
3
Possible error sources: - Since PHP 7, mysql_* functions have been removed, see PHP's official overview of the MySQL drivers. - You use PHP 5.x and do not have enabled the MySQL extension but mysqli and/or PDO_MySQL.
可能的错误来源:-自从PHP 7以来,mysql_*函数已经被删除,请参阅PHP对MySQL驱动程序的官方概述。-你用的是PHP 5。并没有启用MySQL扩展,而是启用了sqmyli和/或PDO_MySQL。
You can set
你可以设置
define('WP_USE_EXT_MYSQL', true);
in your wp-config.php to make WordPress use the mysqli extension.
在你wp-config。php使WordPress使用mysqli扩展。
#2
0
The error seems be simple, mysql_*
functions are not enabled. Check with phpinfo()
if these functions are truly disabled, and if yes, enable it. If no, there are some problems in the code that you are using, but if you have replaced all files as you write, is most probably the first option.
错误看起来很简单,mysql_*函数没有被启用。检查phpinfo()是否真正禁用了这些函数,如果是,则启用它。如果没有,您正在使用的代码中有一些问题,但是如果您在编写时替换了所有文件,那么很可能是第一个选项。
#3
0
It happens for me when I switch from 5.6 php to 7.0.
当我从5.6 php切换到7.0时,就会发生这种情况。
Just enable "mysqli" in your select php version if you use cPanel.
如果使用cPanel,只需在选择的php版本中启用“sqmyli”即可。
#1
3
Possible error sources: - Since PHP 7, mysql_* functions have been removed, see PHP's official overview of the MySQL drivers. - You use PHP 5.x and do not have enabled the MySQL extension but mysqli and/or PDO_MySQL.
可能的错误来源:-自从PHP 7以来,mysql_*函数已经被删除,请参阅PHP对MySQL驱动程序的官方概述。-你用的是PHP 5。并没有启用MySQL扩展,而是启用了sqmyli和/或PDO_MySQL。
You can set
你可以设置
define('WP_USE_EXT_MYSQL', true);
in your wp-config.php to make WordPress use the mysqli extension.
在你wp-config。php使WordPress使用mysqli扩展。
#2
0
The error seems be simple, mysql_*
functions are not enabled. Check with phpinfo()
if these functions are truly disabled, and if yes, enable it. If no, there are some problems in the code that you are using, but if you have replaced all files as you write, is most probably the first option.
错误看起来很简单,mysql_*函数没有被启用。检查phpinfo()是否真正禁用了这些函数,如果是,则启用它。如果没有,您正在使用的代码中有一些问题,但是如果您在编写时替换了所有文件,那么很可能是第一个选项。
#3
0
It happens for me when I switch from 5.6 php to 7.0.
当我从5.6 php切换到7.0时,就会发生这种情况。
Just enable "mysqli" in your select php version if you use cPanel.
如果使用cPanel,只需在选择的php版本中启用“sqmyli”即可。