Support » Plugin: Query Monitor » This Plugin Has an Invalid Header

Viewing 15 replies - 1 through 15 (of 16 total)
  • Same thing for me on a 3.7.1 Multisite install.

    And… just tested on a separate 3.7.1 standard WP install with the same error.

    Plugin Author John Blackbourn


    The issue is to do with a copyright symbol in the plugin header which is messing things up. The files are all UTF-8 encoded and my other plugins don’t have this issue, so I don’t know why it’s happening.

    Anyway, I’ve just pushed an update which, along with other fixes, removes the offending symbols. You should be able to activate it fine now.

    I’m still getting this error on a fresh install, version 2.5.3

    Same error for me with v2.5.3, WP v3.7.1

    Incidentally, I’ve tried on WP Engine hosted site and my local dev with the same result.

    Plugin Author John Blackbourn


    Argh! Not sure what the issue is then.

    Can you try downloading the zip from GitHub and installing that instead? If that works then the issue is with the file.

    Plugin Author John Blackbourn


    Hi John, GitHub did not work either. Same error on local and live.

    Plugin Author John Blackbourn


    Thanks Adam. I’m stumped on that one then. I’ll need to dig deeper and find out under what conditions WordPress decides that a header isn’t valid.

    I just updated to the latest version of WordPress trunk and tried activating v 2.5.3 of the plugin. This time I got a nice debug error for you:

    Plugin could not be activated because it triggered a fatal error.
    ( ! ) Fatal error: Cannot redeclare class QueryMonitor in /Users/morganestes/Documents/Websites/ on line 326
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0018	526444	{main}( )	../plugins.php:0
    2	0.4062	25693972	plugin_sandbox_scrape( )	../plugins.php:149
    Plugin Author John Blackbourn


    I’m unable to reproduce this on any of my WordPress installs.

    I have three small things to try, for whoever would like to try them. Willing volunteers will get a free copy of Query Monitor from me 🙂

    1. Open up the wp-content/db.php file that’s included in the Query Monitor plugin. Remove the line at the top starting with “Plugin Name”, save the file, and try activating Query Monitor again.

    2. Failing that, open up query-monitor.php and delete lines 235-239 (see source code here). Save the file and try activating Query Monitor again.

    3. Failing that, open up wp-admin/includes/plugin.php in your WordPress install. Line 872 should contain this:

    $installed_plugins = get_plugins();

    Immediately after that line, paste this in and save the file:

    var_dump( $plugin );
    var_dump( $installed_plugins );

    Activate Query Monitor again and paste here the contents of whatever is dumped to your screen.

    If any of these three things work for you, please let me know, along with what PHP versions and operating system you’re running.

    Tried 1 & 2, then made a gist for the dump of #3:

    I want to mention that I only get the error when I activate the plugin, and it actually activates and seems to work after that.

    This install is running the trunk version of 3.8 on DesktopServer 3.5.9 (PHP 5.3.1 with debugging turned on) on OS X 10.9.

    I also got this error when activating the plugin for the first time on my localhost – but it seems to work fine if I then visit my wp-admin URL.

    After this, I can deactivate and re-activate fine without errors – just seems to be the initial activate that spits out the “The plugin does not have a valid header.”

    Query Monitor v2.5.4
    WP 3.7.1
    Genesis 2.0.1
    – downloaded zip from WP plugins page
    – uploaded the zip via control panel

    Thanks for creating this plugin – looks ace 🙂




    Getting the same error here…. 🙁

    This happens on fresh installation only. Not on activation/deactivation.

    Plugin Author John Blackbourn


    Fixed in 2.5.6!

    Works like a charm now! Thanks for all your hard work John, super cool!

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘This Plugin Has an Invalid Header’ is closed to new replies.