• Resolved robderijk

    (@robderijk)


    Hi,

    I’ve installed the plugin and although Zend OPCache is up and running the plugin says that Zend OPcache is Not Available. After digging in the code and php settings I discovered that the opcache_get_status function is disabled on our host which most likely prevents the plugin from doing its work.

    Is there a way to somehow use this plugin without that function?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi there,

    We use opcache_get_status to get opcache stats that are used on the Overview and OPcache Viewer page.

    You can try edit file includes/src/Plugin.php at line 378 and change $status variable from 0 to 1.

    public function get_opcache_status($is_raw = false)
        {
            $total_bytes = 0;
            $total_files = 0;
            $status = 0;

    Thanks.

    Thread Starter robderijk

    (@robderijk)

    Thanks! I didn’t know it was only used to show the stats in the admin overview and doesn’t influence the way this plugin works in any other way so I’ll leave it like it is. A lot of shared hosting providers have this method disabled because this function disclose information about neighbour user accounts, hostnames and pathnames.

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi, thank you for the info.

    In the next update, I will try to change how to handle the checking and put some additional notice when this function is disabled. Currently, we only do checking if the function exists or not and assume opcache is not enabled.

    Just for info, this is the list of opcache functions used in Docket Cache:

    opcache_get_status
    opcache_reset
    opcache_compile_file
    opcache_invalidate
    opcache_is_script_cached
    opcache_get_configuration
    

    Thanks again.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘opcache_get_status disabled on hosting’ is closed to new replies.