Hello @siinex,
Check if’/wp-content/object-cache.php’ is present in your system. Potentially it was removed by mistake during the upgrade or any other operation.
I can confirm this issue as well.
The error message is similar but on a different context.
Hence, starting my new support ticket.
Thread Starter
Siinex
(@siinex)
Thanks for the fast response!
Yes, the file is in located in wp-content.
I use Multi Site for WordPress as well. When I upgrade from 5.03 to 5.1, I will get a 500 error on my Network Admin page, but each of my sites will still function.
PHP Fatal error: Cannot redeclare wp_cache_reset() (previously declared in /wp-content/object-cache.php:119) in /wp-includes/cache.php on line 267
Since I have fully transitioned to 5.1, I have to remove WP Total Cache in order to access the Network Admin Dashboards. Or I would have to rolled back to a version that is 5.03, then Total Cache works fine.
Hello @siinex,
Thank you for bringing this to our attention. This issue is now fixed and will be included in the next release. Until then, I can offer you a workaround. Just follow the instructions below:
You need to modify ObjectCache_WpObjectCache_Regular.php
Replace the function __construct() on line 120 with this:
function __construct() {
$this->_config = Dispatcher::config();
$this->_lifetime = $this->_config->get_integer( 'objectcache.lifetime' );
$this->_debug = $this->_config->get_boolean( 'objectcache.debug' );
$this->_caching = $this->_can_cache();
$this->global_groups = $this->_config->get_array( 'objectcache.groups.global' );
$this->nonpersistent_groups = $this->_config->get_array(
'objectcache.groups.nonpersistent' );
$this->_blog_id = Util_Environment::blog_id();
}
Also, you need to modify Extension_FragmentCache_WpObjectCache.php
Replace function __construct() on line 116 with this:
function __construct() {
$this->_config = Dispatcher::config();
$this->_lifetime = $this->_config->get_integer( array( 'fragmentcache', 'lifetime' ) );
$this->_debug = $this->_config->get_boolean( array( 'fragmentcache', 'debug' ) );
$this->_caching = $this->_can_cache();
$this->_blog_id = Util_Environment::blog_id();
$this->_core = Dispatcher::component( 'Extension_FragmentCache_Core' );
}
Thread Starter
Siinex
(@siinex)
Thanks a lot @vmarko ! This helped me out. 🙂
The issue is fixed as of now with aforementioned solution.
Will Look forward for next update.
Hello @vmarko
I have applied your patch and I still see some Warnings and WordPress database Error:
WordPress database error Table 'rb.wp_blogmeta' doesn't exist for query SELECT blog_id, meta_key, meta_value FROM wp_blogmeta WHERE blog_id IN (1) ORDER BY meta_id ASC made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php'), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->load_wordpress, require('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, _prime_site_caches, update_site_cache, update_sitemeta_cache, update_meta_cache, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, W3TC\_CallUnderlying->query, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_Wpdb->default_query
And the following warning:
PHP Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /usr/share/nginx/rb/wp-includes/wp-db.php on line 3283
Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /usr/share/nginx/rb/wp-includes/wp-db.php on line 3283
I am running my cron tasks from wp-cli command line.