Support » Plugin: Google Analytics for WordPress by MonsterInsights » Zend error after update to 5.2.8 in all admin pages

  • Resolved Pioneer Web Design


    I looked up this error I started getting only on one site of several that are using this plugin in the same hosting account:

    Fatal error: Internal Zend error – Missing class information for in /home/content/58/8850058/html/customers/wm/wp-content/plugins/google-analytics-for-wordpress/admin/api-libs/googleanalytics/class-api-googleanalytics.php on line 5

    and found:

    Note, again, same server & same hosting env and the issue occurs only on one site:

    I had to rename the plugin’s folder to google-analytics-for-wordpress.old to get back into the admin. It did not seem to affect the site from loading, just the admin pages.

    This site is using a child theme of Twenty Eleven and these other plugins which are all at current version:

    Comprehensive Google Map Plugin
    Gravity Forms
    Gravity Forms PayPal Standard Add-On
    The Events Calendar
    WordPress SEO
    WP Responsive Menu
    Jetpack by
    —The following modules are active for Jetpack:
    -Widget Visibility

    Since this is happening on just the one site, I am doubting this error has anything to do with APC…

    Note, I updated the plugin yesterday and then made some site edits with no problems (content only). I also made some content only edits this AM and upon a save of an edit to a Page, I received the error shown above. I was then unable to access the admin pages of the site until I renamed the folder…

Viewing 12 replies - 1 through 12 (of 12 total)
  • Unfortunately I am now seeing errors on at least one more site:

    Warning: require_once(/path/wp-content/plugins/google-analytics-for-wordpress/admin/class-admin-assets.php): failed to open stream: No such file or directory in /path/wp-content/plugins/google-analytics-for-wordpress/includes/class-autoload.php on line 62

    Fatal error: require_once(): Failed opening required ‘/path/html/wp-content/plugins/google-analytics-for-wordpress/admin/class-admin-assets.php’ (include_path=’.:/usr/local/php5_4/lib/php’) in /path/wp-content/plugins/google-analytics-for-wordpress/includes/class-autoload.php on line 62

    I am now removing this plugin from all sites.

    We think this problem was caused by a bug in PHP 5.3. We’ve released a beta with a fix for this issue here:

    If everything goes well, we’ll do a stable release next week.

    We’ve also written a blogpost on our ideas with regard to beta testing:

    Public betas for our plugins

    Please let us know if this fixes your problem.


    Thanks for the work on this issue. I do have a question re above as I am running at PHP Version 5.4.19. Should I bother with the beta? Also, some hosts do not allow APC to be turned off (such as the one that is hosting sites noted above – based on host account type). What options do I have left other than manually adding the ga code to the site’s header and just not using this plugin?


    First of all, we never actually succeeded in reproducing this issue. For possible solutions, we started simply looking at the feedback of people who reported this issue and came up with the hypothesis that the issue was caused by the great amount of class_defined checks in our code. We got that idea from a documented 5.3 bug in and could confirm that many people reporting the issue were running on 5.3

    Since we started properly autoloading and prefixing all of our classes, those checks no longer really made sense. So we removed them, which hopefully resolves the Zend issue and as an extra benefit gives the plugin a pretty good performance boost.

    We’re hopeful this will fix the issue for a lot of people, but we currently have no way of being sure.

    BTW with this beta we’ve also enabled a more lightweight use of our plugin by adding setting to completely disable the dashboards functionality.

    So should you bother? I guess the changes we’ve done so far are worth a try. If the beta doesn’t do the trick for you, then at least you’ve helped us rule out a few directions on our way to a proper solution 😉

    In order to rule out any issues with other plugins or themes, I have created a default WordPress install here. WordPress is at 4.1 (fresh install). The theme is twentyfifteen and the only plugin in use is Google Analytics by Yoast. I have authenticated using my GA login and added the key. All seems well, but then again it did on the other sites in this hosting account until a day or so later…

    I will test working on this test site a few times each over next days and see if the issue pops back up. If it does, I will then test the Beta and report on that in same manner.

    Thanks for your quick replies.

    I have yet to be able to reproduce the error. Any thoughts? (refer to above please).

    Sorry I can’t help you reproduce the error. Thank you for your work. It’s strange because I get the error and then don’t get the error. I get locked out of admin and then I get back into admin the site. I used the suggested PHP workaround but that didn’t change anything. What did work was disabling the Yoast Analytics plugin. I will try the beta fix.

    my site Fine Homes of WNC

    I was having the same issue. I just removed the autoload and used require_once for both of the classes. This is a temporary fix, but it’s working pretty well. I just uploaded a revised version of /admin/api-libs/googleanalytics/class-api-googleanalytics.php to all my sites with the issue ( 3 that I’ve noticed so far ). This is just a temporary solution until a new stable version comes out since the update will overwrite the changes.

    On Line 19

    private function load_api_oauth_files() {
    	//spl_autoload_register( array( $this, 'autoload_api_oauth_files' ) );
    	$path        = dirname( __FILE__ );
    	require_once( $path . '/class-googleanalytics-reporting.php');
    	require_once( $path . '/class-google-analytics-client.php');

    Just to reiterate: With no other plugins in use, and using the twentyfifteen theme, on this site, I am still not getting any errors.

    I received last night the error on a site that uses a different caching mechanism than the site I noted in original post. So, I do not believe this is only related to APC and I do believe it is a conflict with a plugin, my guess being JetPack as it is the common plugin on these sites.

    Not sure why the mods are editing my url, it’s:


    It’s a Dev site to demonstrate issues, not my main site.

    I have installed v 5.3 on all sites and it is running without issue on all (as of now).

    Thanks for the update.

    Taco Verdonschot


    Yoast Developer

    Thanks for your feedback!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Zend error after update to 5.2.8 in all admin pages’ is closed to new replies.