• Resolved Jim

    (@jblackburn)


    Hi, thanks for keeping this plugin alive. I migrated from the old plugin to yours, but in adding a new redirect, I am getting the folloiwng error (a couple of intial locations changed for security reasons):

    Fatal error: Call to undefined function opcache_reset() in /location/location/public_html/wp-content/plugins/rw-quick-page-and-post-redirects/rw_Quick-PagePost-Redirects.php on line 201

    I can tell you what prompted me to install yours, was that I was at 251 redirects on the old plugin, and it was not allowing me to add another one… not sure if that is related.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Jim

    (@jblackburn)

    A couple of follow-up notes if it helps debug:

    1. Even though it gives the fatal error, it actually adds the redirect, but will not show until the page is reloaded.
    2. If a redirect is deleted, it will not reflect in the listing until the page is refreshed.

    @jblackburn, are you comfortable in doing an edit on one of the PHP files (preferably via Notepad and not WP Admin)?

    I need you to test a change for me, please, if you can. If you can’t, I’ll do a quick ZIP for you with the change needed.

    In file: wp-content/plugins/rw_Quick-PagePost-Redirects/rw_Quick-PagePost-Redirects.php,

    SEARCH FOR:

    		// Starting with PHP 5.5.0 and all 7.x, PHP caches a lot of stuff.
    		if (version_compare(phpversion(), '5.5.0', '>=')) {
    			opcache_reset();
    		}

    REPLACE WITH:

    		// Starting with PHP 5.5.0 and all 7.x, PHP caches a lot of stuff.
    		if (function_exists('opcache_invalidate')) {
    			if (version_compare(phpversion(), '5.5.0', '>=')) {
    				opcache_reset();
    			}
    		}

    Let me know if that works for you, please

    Thread Starter Jim

    (@jblackburn)

    That worked, thanks! I thought I had a few issues right after the change, but I think it was all related to the browser caching. I was able to add and delete, without getting the error. Many thanks for your fix.

    Hadn’t even considered that OpCaching wouldn’t be present on every server. Glad my workaround worked, hah!

    Thanks for letting me know, and the follow up!

    Got 1.0.1 pushed out just now. Thank you for working with me on this, @jblackburn!

    You’ll be happy to know that you actually also helped someone else with their issue here. Different result, but same underlying cause. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Fatal Error’ is closed to new replies.