• When trying to upgrade my SiteGround site from PHP 7 to 8 I get this error:

    Warning: Cannot modify header information - headers already sent by (output started at object-cache.php:463) in wp-includes/pluggable.php on line 1093

    object-cache.php:463 is:

    $this->global_prefix = '';

    which also causes another issue:

    Creation of dynamic property WP_Object_Cache::$global_prefix is deprecated

    I am already using version 7.6.4 of the speed optimizer plugin released on August 14th 2024.

    Can anyone please help me fix this? Is there any action required on my side? If its a bug that SG needs to fix, then could you please fix it before asking users to upgrade to PHP 8? Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Delyan Delov

    (@delyandelov)

    Hi @siddjain,

    Could you please try disabling the Memcached option within our plugin? Then ensure the Memcached service in SiteTools is activated before enabling it back from within the plugin.

    Thread Starter siddjain

    (@siddjain)

    I did that. It does not change anything (why should it?)

    Step 1: disable memcache option within the plugin:

    Step 2: ensure the Memcached service in SiteTools is activated – it already was

    Step 3: enable memcache option within the plugin

    the file object-cache.php does not change. It still has this code which causes the errors:

    $this->global_prefix = '';
    $this->blog_prefix = '';
    if ( function_exists( 'is_multisite' ) ) {
    $this->global_prefix = ( is_multisite() || defined( 'CUSTOM_USER_TABLE' ) && defined( 'CUSTOM_USER_META_TABLE' ) ) ? '' : $table_prefix;
    $this->blog_prefix = ( is_multisite() ? $blog_id : $table_prefix ) . ':';
    }

    $this->cache_hits =& $this->stats['get'];
    $this->cache_misses =& $this->stats['add'];

    Also I am puzzled why the issue happens when trying to upgrade to PHP 8 because the errors don’t seem to be PHP related. They seem to be WP related.

    https://www.php.net/manual/en/migration80.deprecated.php

    https://www.php.net/manual/en/migration80.incompatible.php

    What is the difference between enabling memcache from site tools vs. the speed optimizer plugin? There seem to be two ways of doing the same thing and is confusing.

    • This reply was modified 1 month, 1 week ago by siddjain.
    Plugin Support Delyan Delov

    (@delyandelov)

    Since your site is hosted at SiteGround, could you please create a ticket regarding the issue so our advanced technical support could further investigate it.

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