Support » Plugin: Woody ad snippets - Insert Header Footer Code, AdSense Ads » Database access failing with global $wpdb

  • Hi,
    I have some php in my wordpress page to display information pulled from a database table, however recently it showed up the following error:

    Database access failed: Access denied for user ‘masjidze’@’localhost’ (using password: NO)

    I don’t understand how this could be as the php code is using “global $wpdb” which is basically calling and talking to a table located within the main WP database; using the same credentials; however the rest of the site both front and back end works

    Any help on this one please?

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author WillBontrager

    (@willbontrager)

    Hi,
    If the code you’re using between the insert_php tags used to work but doesn’t work now, then something changed. If the code between the tags wasn’t changed, then something else changed. Perhaps a new plugin was activated that interferes with it; but that’s just a wild guess because I don’t have access to your system.

    On the other hand, if this is new code you’re putting between insert_php tags, then it may be the global variable isn’t as global as it might be assumed. The
    https://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#functionscope
    section on the instruction page and the section immediately below that may provide information you can use.

    Try echoing the value or type for $wpdb, then check your error logs. They may provide a clue.

    Will

Viewing 1 replies (of 1 total)
  • The topic ‘Database access failing with global $wpdb’ is closed to new replies.