• Resolved consultant1027

    (@consultant1027)


    A site I hardly every log into which I logged into today started triggering my down monitor for page keyword search but the pages were loading. But then I found sporadically in any area in admin I’d get the critical error but then a reload of the page and it’s fine. I thought I maybe changed something to break it but (1) investigation of the debug output shows:

    [10-Jan-2024 02:27:49 UTC] PHP Fatal error: Uncaught Error: Call to undefined function opcache_reset() in /home/clearview/public_html/wp-content/plugins/nextgen-gallery/src/Util/Installer.php:124

    And (2) I see a new version was released about 3 hours before this started happening (says it came out 9 hours ago – ver 3.56) and my EasyUpdates Manager probably updated it shortly after.

    Had me banging my head against the wall! So looks like you possibly have a bug in 3.56 as I’ve not had this issue prior?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Quick fix (not nice).

    I commented out the offending line (124) in the file /htdocs/wp-content/plugins/nextgen-gallery/src/Util/Installer.php. The site is online again. I’ll live with this until an update is provided.

    // Attempt to reset the opcache. NextGEN 3.50+ and Pro 3.30+ moved, renamed, and deleted several files
    // and purging the opcache should help prevent fatal errors due to cached instructions.
    // \opcache_reset();

    FYI, A nicer fix that worked for me.
    – Install “WP Rollback” plugin
    – Once installed, there is a “rollback” link below the NextGen plugin
    – Rollback to 3.55
    – Turn off auto update (for now) on NextGen

    • This reply was modified 1 year, 2 months ago by tagoofy.
    Thread Starter consultant1027

    (@consultant1027)

    I was wondering about a feature like that. Rollback option should be a standard feature of WordPress! I manage too many sites to do manual updates and test. If a down monitor is trigger then I investigate, backup the database, then restore the backup before the plugin was updated, restore the database backup (assuming the update didn’t make changes to it’s DB table structure) and then exclude it from auto updates until the problem is resolved.

    That rollback plugin is a much more elegant solution.

    I see an update has occurred… 3.57 updates the line to check for the existence of the function.

    // Attempt to reset the opcache. NextGEN 3.50+ and Pro // 3.30+ moved, renamed, and deleted several files
    // and purging the opcache should help prevent fatal // errors due to cached instructions.
            if( \function_exists( 'opcache_reset' ) ) {
                \opcache_reset();
            }

    i updated still having site encountered error issue

    All my sites have auto updated and all now error free.

    Plugin Support Mihai Ceban

    (@mihaiimagely)

    Hi @consultant1027, @coldstreamer, @tagoofy, @scottgeek,

    I am happy to inform you that the problem with opcache_reset() function not being found on some servers was resolved in NextGen Gallery 3.37

    @nobodysepcial,

    Could you please try deleting NextGen Gallery then install it new to see if that’ll resolve the problem encountered? If the issue persists, please create a new thread because it may be unrelated to opcache_reset().

    Yepp. My problems are now resolved with 3.57. Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘3.56 is generating sporadic PHP Fatal related to opcache_reset()’ is closed to new replies.