Snapshot errors - more

I am now seeing these errors... what do these mean?

2012-10-30 22:49:58: Notice: errno:8 Undefined variable: db_name /home/mysitename/public_html/wp-content/plugins/snapshot/lib/snapshot_utilities.php on line 90
2012-10-30 22:49:58: Notice: errno:8 Undefined variable: wpdb_prefix /home/mysitename/public_html/wp-content/plugins/snapshot/lib/snapshot_utilities.php on line 91

  • aecnu
    • WP Unicorn

    Greetings robert_andrews,

    Sorry to hear that you are having an issue with Snapshot and I honestly do not know why you are having those errors in which I cannot reproduce and have never seen before.

    Therefore I will see if I can get the very responsive and professional lead developer in here with his invaluable insight into this plugin for his advice/advise for us.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • Paul
    • The Green Incsub

    Thanks @aecnu,


    Those Notices you are seeing in the snapshot logs (assumed those are log entries) are strange. Here are the line 90 and 91 from snapshot_utilities.php

    90 $db_name = DB_NAME;
    91 $wpdb_prefix = str_replace('_', '\_', $wpdb->prefix);

    On line 90 we are taking the defined DB_NAME which is setup in your wp-config.php and assigning it to a local variable.

    On line 91 we are taking the database prefix from the global $wpdb class and filtering it to escape the underscores for the query we are about to execute. The $wpdb->prefix should always be defined.

    So again we are taking what should be considered global variables and creating local versions that are being used. Not sure why you are seeing these Notices. Since those should always be there. What other plugins or theme are you running? I've seen some plugins like our own Multi-DB that will sub-class the WordPress $wpdb class to extend it. But it keeps the legacy items like prefix.

  • Tom Eagles
    • Syntax Hero

    Hiya, just going through some of the older threads here.

    As it's been a little while since we last heard from you I thought I'd check in to see how you're going?

    If you're still looking for some further assistance with this thread then please feel free to reopen the thread or of course for any new and related issues you are most welcome to open a new thread.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.