Support » Plugin: Site Kit by Google » Call to undefined function opcache_reset

  • Resolved iskmogul

    (@iskmogul)


    So I just installed Google Site Kit to handle Analytics/GTM after another plugin that was doing the job was ruined by an update. No problems getting it set up aside from a small hiccup with GTM that was easily resolved.

    The real issue become apparent when I went to update other plugins. Anytime I install a new plugin, or update an existing one, I get an “Update Failed!” message and am redirected to the plugin update page that displays an error referencing this plugin.

    PHP version: Litespeed 7.3.14

    LiteSpeed Cache plugin is also installed, but Google Site Kit’s files should be exempted from caching. I already tried resetting Google Site Kit, no change. Also exempted the plugin files in Cloudflare, no apparent change there either.

    Here’s the text of the error in question as it appears on the plugin update page. (with identifying domain info removed for security)

    Fatal error: Uncaught Error: Call to undefined function opcache_reset() in /wp-content/plugins/google-site-kit/google-site-kit.php:102 Stack trace: #0 /wp-includes/class-wp-hook.php(290): googlesitekit_opcache_reset(Object(Plugin_Upgrader)) #1 /wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array) #2 /wp-includes/plugin.php(478): WP_Hook->do_action(Array) #3 /wp-admin/includes/class-wp-upgrader.php(836): do_action(‘upgrader_proces…’, Object(Plugin_Upgrader), Array) #4 /wp-admin/includes/class-plugin-upgrader.php(108): WP_Upgrader->run(Array) #5 /wp-admin/update.php(138): Plugin_Upgrader->install(‘https://downloa…’) #6 {main} thrown in /wp-content/plugins/google-site-kit/google-site-kit.php on line 102

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’m dumb, found the solution minutes after making this. I hadn’t enabled OPCache in my PHP config.

    Plugin Support Renee Johnson

    (@reneesoffice)

    @iskmogul thanks for your report and follow up! Which version of the plugin were you on previously?

    The sad thing is that my hosting company wouldn’t let me enable opcache as i am in a “share hosting”.

    Any other ideas what to do?
    Thanks!

    I had a similar error to iskmogul when updating from version 1.2.0 to 1.3.0 today. I received the following error in my log:

    ——————————————————————————–
    2020-02-14T16:39:29+00:00 CRITICAL Uncaught Error: Call to undefined function opcache_reset() in /home/*********/public_html/wp-content/plugins/google-site-kit/google-site-kit.php:102
    Stack trace:
    #0 /home/*********/public_html/wp-includes/class-wp-hook.php(290): googlesitekit_opcache_reset(Object(Plugin_Upgrader))
    #1 /home/*********/public_html/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(”, Array)
    #2 /home/*********/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 /home/*********/public_html/wp-admin/includes/class-plugin-upgrader.php(316): do_action(‘upgrader_proces…’, Object(Plugin_Upgrader), Array)
    #4 /home/*********/public_html/wp-admin/update.php(47): Plugin_Upgrader->bulk_upgrade(Array)
    #5 {main}
    thrown in /home/*********/public_html/wp-content/plugins/google-site-kit/google-site-kit.php on line 102

    2020-02-14T16:40:39+00:00 CRITICAL Uncaught Error: Call to undefined function opcache_reset() in /home/*********/public_html/wp-content/plugins/google-site-kit/google-site-kit.php:102
    Stack trace:
    #0 /home/*********/public_html/wp-includes/class-wp-hook.php(290): googlesitekit_opcache_reset(Object(Plugin_Upgrader))
    #1 /home/*********/public_html/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(”, Array)
    #2 /home/*********/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 /home/*********/public_html/wp-admin/includes/class-plugin-upgrader.php(316): do_action(‘upgrader_proces…’, Object(Plugin_Upgrader), Array)
    #4 /home/*********/public_html/wp-admin/update.php(47): Plugin_Upgrader->bulk_upgrade(Array)
    #5 {main}
    thrown in /home/*********/public_html/wp-content/plugins/google-site-kit/google-site-kit.php on line 102
    ——————————————————————————–

    ********* Actual dir path changed for security.

    Is iskmogul’s fix required? Is this Site Kit’s solution?

    Thank You,
    gigi13

    • This reply was modified 3 months, 2 weeks ago by gigi13.

    Here’s my error:

    Error Details
    =============
    An error of type E_ERROR was caused in line 102 of the file /home2/etc/wp-content/plugins/google-site-kit/google-site-kit.php. Error message: Uncaught Error: Call to undefined function opcache_reset() in /home2/etc/wp-content/plugins/google-site-kit/google-site-kit.php:102

    if it helps any.
    Thanks!
    Gabi

    Plugin Support Renee Johnson

    (@reneesoffice)

    @gabstero @gigi13 thanks for the feedback, we’re looking into it. In the meantime, could you open a new topic per forum guidelines with information regarding your case? Your Site Health information would be helpful as well. thanks so much

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.