Support » Localhost Installs » PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in

  • Resolved sbsmain

    (@sbsmain)



    I installed php 7.2 and have since gotten this error:
    PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\inetpub\wwwroot\wp-includes\wp-db.php:1564

    I’ve googled it and tried several things, but nothing seems to work. I’m new to this, so, I could use some help. If I reinstall WordPress, what folders would I need to replace to get my website going again?

    Mike in SC

Viewing 4 replies - 1 through 4 (of 4 total)
  • Joy

    (@joyously)

    WordPress itself supports PHP 7.2 (at least I assume you are using a fairly recent version of WP). Make sure your environment has either MySQL 5.6+ or MariaDB 10+.

    Dion Designs

    (@diondesigns)

    Please check your wp-config.php file for the following line:

    define('WP_USE_EXT_MYSQL', true);

    If you find it, delete the line. Your problem should be fixed.

    If you still have the problem, then you incorrectly installed PHP 7.2.x. The error you reported is not possible if you are using PHP 7.2.x and the above line isn’t in wp-config.php.

    Installing Mariadb 10.3 fixed this.

    I can now view my webpage in localhost and access it from other computers on my domain, but the graphics don’t disply on the other computers. The problem is my path is pointed to localhost. So, I’m currently trying to login to the wordpress dashboard, but it doesn’t give me that option. Any ideas?

    • This reply was modified 1 week, 6 days ago by  sbsmain.

    I’ll mark this one resolved and post the new issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.