PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect()
-
Hi,
I am having issues setting up WordPress and a localhost built with Apache 2.4.43, PHP 7.2.30 MariaDB 10.3.13. My system is Windows 10 64bit x64.
This has been raised before, but the solutions have not worked for me.
See:
https://ww.wp.xz.cn/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-mysql_connect-in/
https://ww.wp.xz.cn/support/topic/mysql-connect-requests-causing-fatal-error-on-php-7-2-and-7-3-in-wordpress-files/
ttps://stackoverflow.com/questions/35424982/how-can-i-enable-the-mysqli-extension-in-php-7
https://stackoverflow.com/questions/10388833/how-can-i-tell-if-pdo-module-installed-disabledWhen I try to install WordPress I get this error:Fatal error: Uncaught Error: Call to undefined function mysql_connect().
Mysql_connect() is deprecated https://www.php.net/manual/en/function.mysql-connect.php but it is used as a fallback in WordPress if mysqli is misconfigured.
The extension php_mysqli.dll is in the c:php/ext folder.
The following extensions are enabled in php.ini
extension=mysqli (also tried extension=php_mysqli.dll)
extension=pdo_mysqlPath to extension folder in php:
extension_dir = “C:/php/ext”
The wp-config file does not contain the following:
define(‘WP_USE_EXT_MYSQL’, true); or ‘WP_USE_EXT_MYSQL’, false);I used <?php php_info() ?> to display the PHP settings and this shows that PDO drivers are not enabled (no value).
In the command line, php -m lists mysqli and pdo_mysql as modules.
I did stop and restart Apache after every change.
Does anyone have an idea what could be the problem here?
Thanks
The page I need help with: [log in to see the link]
The topic ‘PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect()’ is closed to new replies.