Error reporting when upgrading PHP version 5.6 to 7. X under WordPress (resolved)
Cause of event:
When using WordPress, the theme needs to be upgraded. The PHP version required for viewing the theme is 7.1+
When the website is not backed up, the PHP version is changed to 7.2, which directly leads to the website error
Fatal error: Uncaught Error: Call to undefined function mysql_ connect()
Check many online tutorials, which are MySQL in wp-db.php_Change connect() to mysqli_Connect(), no result
At first, I thought that the database reported an error, checked the database in detail, wrote checkdb.php, locally connected to the database, and checked that the database server was running well
Solution:
Set define ('wp_use_ext_mysql ', true) in wp-config.php
delete
error explanation:
define('WP_USE_EXT_MYSQL',true);
define(‘WP_USE_EXT_MYSQL’, true); Force WP to use MySQL by default instead of MySQL Li
so please delete this line and the problem should be solved.
Otherwise, you can check nd in the PHP 7 configuration_Mysqli extension, and disable mysqli extension – > Select the PHP version.
Read More:
- [PHP] Solve PHP Call to undefined function ldap_connect()
- PHP encryption 3DES error Call to undefined function: mcrypt_module_open() solution
- [WordPress Error] Fatal error undefined function is_network_admin()
- [Solved] PHP Fatal error: Uncaught Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes
- [Solved] PHP Fatal error: Uncaught Error: Class ‘Redis‘ not found in
- php Error: mail() Failed to connect to mailserver at “localhost” port 25
- Mac PHP Fatal error: Class ‘Memcache’ not found
- How to Solve PHP Fatal error: Namespace declaration statement has to be the very first statement
- [Solved] Fatal error: Uncaught Error: Class ‘Imagick‘ not found
- PHP: How to get the total number of data in the MySQL table (total number of rows)
- PHP Error Object of class mysqli could not be converted to string in
- PHP error in Windows: class’ mysqli ‘not found
- Error during session start; please check your PHP and/or webserver log file and configure your PHP
- 404 solution for WordPress Chinese tag
- [Solved] Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 60
- php_network_getaddresses: getaddrinfo failed (How to Fix)
- Mac installs the php Swoole extension and appears Enable openssl support, require openssl library or fatal error:’openssl/ssl.h’ file not found
- Error during PHP installation and configuration error: off_t undefined; check your library configuration
- Fatal error: Function name must be a string in
- How to Hide index.php