• Resolved lakenjr

    (@lakenjr)


    As a test, I ran a database backup and then tried to restore from it. Received the following message when trying to restore. I am running WordPress 4.9.5 with PHP version: 7.0.29

    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/jetlagan/public_html/wp-content/plugins/wp-database-backup/includes/admin/class-wpdb-admin.php:240 Stack trace: #0 /home/jetlagan/public_html/wp-includes/class-wp-hook.php(286): WPDB_Admin->wp_db_backup_admin_init(”) #1 /home/jetlagan/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #2 /home/jetlagan/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /home/jetlagan/public_html/wp-admin/admin.php(156): do_action(‘admin_init’) #4 /home/jetlagan/public_html/wp-admin/tools.php(10): require_once(‘/home/jetlagan/…’) #5 {main} thrown in /home/jetlagan/public_html/wp-content/plugins/wp-database-backup/includes/admin/class-wpdb-admin.php on line 240

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    Replace mysql_connect function with mysqli_connect

    As well as you can restore backup manually.

    1)Login to phpMyAdmin
    2)Click Databases and select the database that you will be importing your data into.
    3)Across the top of the screen will be a row of tabs. Click the Import tab.
    4)On the next screen will be a location of text file box, and next to that a button named Browse.
    5)Click Browse. Locate the backup file stored on your computer.
    6)Click the Go button

    Hi Prashant,

    I’m having the same problem, so I think the answer above would apply to me. Only, I can’t find the setting for mysql_connect so that I can replace it.

    Can you please tell me where that setting is?

    Thanks!

    After posting, I took a guess that you were suggesting that we alter the php.

    So I went into:
    /wp-content/plugins/wp-database-backup/includes/admin/class-wpdb-admin.php

    And made the change on line 240, replacing mysql_connect function with mysqli_connect.

    This threw a subsequent error, “Fatal error: Uncaught Error: Call to undefined function mysql_select_db()…. thrown in /wp-content/plugins/wp-database-backup/includes/admin/class-wpdb-admin.php on line 242”.

    My guess is that mysqli_connect is not active on my server and, frankly, I’m going to go ahead and give up on this. It’s not worth the extra effort and my trust in your process is shot anyhow.

    Shame, really. Seemed like such a handy little tool, being able to quickly backup/restore while developing.

    I’ll monitor this thread, just in case you post a better solution.

    Thanks!

    Hi,

    we have resolved issue in latest version i.e 4.6.3.

    Please update your plugin and let me know in case any issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal error on restore’ is closed to new replies.