• Hi guys and gals,

    Sorry to be that guy. Having an absolutely horrible time with getting our site up and running, https://www.thenichehairstudio.com.au – it’s worked perfectly up until the last couple days. I installed this with my web hostings app installation process so please bear with me as I’m quite fresh to all of this. The site is now displaying the following error:

    “Fatal error: Call to undefined function mysql_connect() in /home/thenich2/public_html/wp-includes/wp-db.php on line 1520”

    I have no idea what it means or how to fix it. I can’t log into the admin page either. I’ve changed nothing prior to this displaying and the site had been running as is for a month or so. Any help would be amazing.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator James Huff

    (@macmanx)

    Try manually resetting your plugins (no Dashboard access required). If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue (theme functions can interfere like plugins).

    Hi,
    Please check if MySQL service is running on your server.

    Try checking if the PHP MySQL module is being loaded by creating phpinfo file with following code

    <?php
    phpinfo();
    ?>

    If it is not there, add the following line to the php.ini file in your root directory

    extension=php_mysql.dll

    P.S. I would advise to consider MySQL extension as deprecated and to use MySQLi or even PDO for working with databases

    Thanks

    Thread Starter mattybix

    (@mattybix)

    Sorry I’m not too great with these things. I created the phpinfo file however, could you point me in the right direction? Thanks

    https://thenichehairstudio.com.au/phpinfo.php

    Moderator James Huff

    (@macmanx)

    MySQLi is there, so it’s not that.

    Try the steps I provided in my first reply.

    Thread Starter mattybix

    (@mattybix)

    Thanks for getting back to me James, I have tried the steps you’ve listed with no luck unfortunately.

    Moderator James Huff

    (@macmanx)

    Ok, try downloading WordPress again, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, and delete then replace your copies of everything on the server except the wp-config.php file and the /wp-content/ directory with fresh copies from the download. This will effectively replace all of your core files without damaging your content and settings.

    Some uploaders tend to be unreliable when overwriting files, so don’t forget to delete the original files before replacing them.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Call to undefined function mysql_connect’ is closed to new replies.