Mysql driver was deprecated a long time ago. Which WordPress version are you using?
Hi @wibergsweb thank for your reply
my WordPress version is 5.6.1
i think that is the latest version of WordPress
i have tried to deactivating all plugin
then re-install WordPress. but still the same. inside wp-db.php still call deprecated mysql_connect()
function
This looks like the mysqli()
is not loaded on the server and therefore mysql()
is used instead. This seems to be a misconfiguration on the server.
Just to be sure…. Can you create a file
<?php
phpinfo();
and print it out on the server where you have your website?
Hello,
sory for late respons
then, what part should i see from that report ?
No prob
You should see if mysqli is activated. (not only mysql driver). Search for mysqli when viewing your report.
If you don’t get a result , mysqli is not activated on the server. (which it should be).
-
This reply was modified 3 years, 5 months ago by
wibergsweb.
-
This reply was modified 3 years, 5 months ago by
wibergsweb.
yes, it’s activated, i can see it from the report or also from the php selector option
mysqli also activated when i switched to php 8
my question, does this problem can be caused by the caching plugin ?
if yes i will try to delete the plugin first (not only deactivate). i just need to wait the right time to do that.
Yes it can absolutely be an issue! If you have caching plugin – REMOVE cache BEFORE deactivating (That’s more important than removing it).
Hello, you managed to solve the problem, I updated the wordpress to the latest version and then the PHP and the same problem occurred, I had almost no plugin installed, the site is new, I had not even started to create
@esneygarcia – what problem is it? 🙂 Is it the mysql error? What host are you using?
-
This reply was modified 3 years, 4 months ago by
wibergsweb.
Got exactly the same problem few days after upgrading to PHP 8
wp-login.php shows:
“`There has been a critical error on this website.
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/ndoajyxx/phil.cyou/wp-includes/wp-db.php:1685 Stack trace: #0`
I could not reach the WP Dashboard, even the WP RESET Emergency login did not work!!!
MY SOLUTION:
in my host provider (WebHostFace.com)
in CPANEL=> PHP SELECTOR => EXTENSIONS
I activated (I checked the boxes):
nd_mysqli
nd_pdo_mysql
Check PHP VERSION 8! because for each version of PHP, the extensions are different!
and then IT WORKS, websites came back!!! Not even needed to refresh the tab.
Do not ask me why. I just read something about mysqli in the thread above and I searched and tried
26 June 2021
Michael Web Taiwan