• Resolved sittingpilgrim

    (@sittingpilgrim)


    I’m fairly new to WordPress – have experience with creating and editing blogs, but am looking to create a more detailed site with WP as CMS;

    Install on local system using Apache 2.4/25, MySQL 5.7, PHP 7.0.14, WP 4.72 (system is also running SQL Server for another project; MySQL installation previously tested and functional), Windows 7; tried in Google Chrome & Firefox;

    Launch of wp-admin/install.php generates the following error report in WP-DEBUG (paths edited):
    PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in [..]\wordpress\wp-includes\wp-db.php:1568
    Stack trace:
    #0 [..]\wordpress\wp-includes\wp-db.php(658): wpdb->db_connect()
    #1 [..]\wordpress\wp-includes\load.php(404): wpdb->__construct(‘root’, ”, ‘wpdev1’, ‘localhost’)
    #2 [..]\wordpress\wp-settings.php(107): require_wp_db()
    #3 [..]\Users\Tom\Projects\wordpress\wp-config.php(90): require_once(‘…’)
    #4 C:\Users\Tom\Projects\wordpress\wp-load.php(37): require_once(‘…’)
    #5 C:\Users\Tom\Projects\wordpress\wp-admin\install.php(36): require_once(‘…’)
    #6 {main}
    thrown in C:\Users\Tom\Projects\wordpress\wp-includes\wp-db.php on line 1568

    Per https://php.net/manual/en/mysqli.installation.php : “the mysqli extension is enabled and uses the MySQL Native Driver by default”; Tried explicitly declaring it in PHP.INI, no luck;
    Fresh installation – no plug-ins or extensions other than that in WP; re-downloaded WP in case of some obscure source of error;
    Error occurs whether I create wp-config or let the setup program do it;

    Any help appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You should double-check that the mysqli extension in installed and active, because that’s what you shoudl be using by default.

    The older mysql (without the i) have been depracated for years now, and have been removed in PHP7, which is why you’re seeing that error. After looking at the file WordPress will try and use mysqli first and if it isn’t available it will fall back to the older mysql. That tends to suggest that you haven’t got the mysqli extension set up properly. Just do that, and it will all be good to go.

    Thread Starter sittingpilgrim

    (@sittingpilgrim)

    Thanks @catacaustic – this did the trick. When I said “Tried explicitly declaring it in PHP.INI”, I had mis-typed the extension name do just ‘extension=mysqli.dll’ instead of the correct ‘extension=php_mysqli.dll’. Now I get all the mysqli details in my phpinfo(), and the install completed.

    Now I can get to work!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error using wp-admin/install.php — Call to undefined function mysql_connect()’ is closed to new replies.