Cache-storingen (WordPresss): verschil tussen versies

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
(Nieuwe pagina aangemaakt met 'In mei 2022 een site geklooned naar een andere server. Foutmelding: <pre> $ wp Fatal error: Uncaught RuntimeException: Failed to locate and load object cache API....')
 
 
(Een tussenliggende versie door dezelfde gebruiker niet weergegeven)
Regel 1: Regel 1:
In mei 2022 een site geklooned naar een andere server. Foutmelding:
+
Some errors, seemingly related to the same caching-related issue
 +
 
 +
== May 2022 ==
 +
 
 +
Error in May 2022, after cloning a site:
  
 
<pre>
 
<pre>
Regel 18: Regel 22:
 
</pre>
 
</pre>
  
Na uitzetten van allerlei caching-specifieke instellingen in wp-config.php, veranderde de foutmelding:
+
After disabling all kinds of caching-specific settings in wp-config.php, the error message changed:
  
 
<pre>
 
<pre>
Regel 37: Regel 41:
 
</pre>
 
</pre>
  
Vervolgens de MU-plugins uitgezet door de naam van de map te hernoemen. Toen verdween het probleem.
+
Then disabled the MU plugins by renaming the folder. Then the problem disappeared.
 +
 
 +
== Sep. 2022 ==
 +
 
 +
Almost the same error, also during cloning of a site (''nl_nl'' → ''eur_en'') that relied heavily on caching (WP Rocket, Redis, more?):
 +
 
 +
=== Error ===
 +
 
 +
<pre>
 +
Fatal error: Uncaught RuntimeException: Failed to locate and load object cache API in /var/www/example.com/wp-content/object-cache.php:56
 +
Stack trace:
 +
#0 /var/www/example.com/wp-includes/load.php(694): require_once()
 +
#1 /var/www/example.com/wp-settings.php(131): wp_start_object_cache()
 +
#2 phar:///opt/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1271): require('...')
 +
#3 phar:///opt/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1192): WP_CLI\Runner->load_wordpress()
 +
#4 phar:///opt/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
 +
#5 phar:///opt/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(77): WP_CLI\Bootstrap\LaunchRunner->process()
 +
#6 phar:///opt/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
 +
#7 phar:///opt/wp/php/boot-phar.php(11): include('...')
 +
#8 /opt/wp(4): include('...')
 +
#9 {main}
 +
  thrown in /var/www/example.com/wp-content/object-cache.php on line 56
 +
Error: Er heeft zich een kritieke fout voorgedaan op deze site.Meer informatie over probleemoplossing in WordPress. Er heeft zich een kritieke fout voorgedaan op deze site.
 +
</pre>
 +
 
 +
=== What I think it says ===
 +
 
 +
* The error is generated in file wp-content/object-cache.php on line 56
 +
* In lines 31-40, this script tries to load various caching-related classes. When they all fail, the exception is thrown.
 +
 
 +
=== Solution: Remove object-cache.php ===
 +
 
 +
* When I remove file /wp-content/object-cache.php, the error disappears. I believe this file is a ''drop-in replacement'' for native WordPress caching. Am I supposed to replace it with some original file, or just leave it like this?
 +
* In the same directory, there is a file ''advanced-cache.php'', that also seems related to Redis or whatever. It seems I can also remove that (=changed the name).
  
== Zie ook ==
+
== See also ==
  
 
* [[Foutmelding - WP CLI/Runner.php (WordPress)]]
 
* [[Foutmelding - WP CLI/Runner.php (WordPress)]]

Huidige versie van 20 sep 2022 om 10:02

Some errors, seemingly related to the same caching-related issue

May 2022

Error in May 2022, after cloning a site:

$ wp
Fatal error: Uncaught RuntimeException: Failed to locate and load object cache API. in /var/www/example.com/wp-content/object-cache.php:52
Stack trace:
#0 /var/www/example.com/wp-includes/load.php(694): require_once()
#1 /var/www/example.com/wp-settings.php(131): wp_start_object_cache()
#2 phar:///opt/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1271): require('...')
#3 phar:///opt/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1192): WP_CLI\Runner->load_wordpress()
#4 phar:///opt/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
#5 phar:///opt/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(77): WP_CLI\Bootstrap\LaunchRunner->process()
#6 phar:///opt/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
#7 phar:///opt/wp/php/boot-phar.php(11): include('...')
#8 /opt/wp(4): include('...')
#9 {main}
  thrown in /var/www/example.com/wp-content/object-cache.php on line 52

After disabling all kinds of caching-specific settings in wp-config.php, the error message changed:

wp cache
Fatal error: Uncaught RuntimeException: Failed to locate and load Object Cache Pro plugin. in /var/www/example.com/wp-content/mu-plugins/redis-cache-pro.php:38
Stack trace:
#0 /var/www/example.com/wp-settings.php(349): include_once()
#1 phar:///opt/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1271): require('...')
#2 phar:///opt/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1192): WP_CLI\Runner->load_wordpress()
#3 phar:///opt/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
#4 phar:///opt/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(77): WP_CLI\Bootstrap\LaunchRunner->process()
#5 phar:///opt/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
#6 phar:///opt/wp/php/boot-phar.php(11): include('...')
#7 /opt/wp(4): include('...')
#8 {main}
  thrown in /var/www/example.com/wp-content/mu-plugins/redis-cache-pro.php on line 38
Error: Er heeft zich een kritieke fout voorgedaan op deze site.Meer informatie over probleemoplossing in WordPress. Er heeft zich een kritieke fout voorgedaan op deze site.

Then disabled the MU plugins by renaming the folder. Then the problem disappeared.

Sep. 2022

Almost the same error, also during cloning of a site (nl_nleur_en) that relied heavily on caching (WP Rocket, Redis, more?):

Error

Fatal error: Uncaught RuntimeException: Failed to locate and load object cache API in /var/www/example.com/wp-content/object-cache.php:56
Stack trace:
#0 /var/www/example.com/wp-includes/load.php(694): require_once()
#1 /var/www/example.com/wp-settings.php(131): wp_start_object_cache()
#2 phar:///opt/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1271): require('...')
#3 phar:///opt/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1192): WP_CLI\Runner->load_wordpress()
#4 phar:///opt/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
#5 phar:///opt/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(77): WP_CLI\Bootstrap\LaunchRunner->process()
#6 phar:///opt/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
#7 phar:///opt/wp/php/boot-phar.php(11): include('...')
#8 /opt/wp(4): include('...')
#9 {main}
  thrown in /var/www/example.com/wp-content/object-cache.php on line 56
Error: Er heeft zich een kritieke fout voorgedaan op deze site.Meer informatie over probleemoplossing in WordPress. Er heeft zich een kritieke fout voorgedaan op deze site.

What I think it says

  • The error is generated in file wp-content/object-cache.php on line 56
  • In lines 31-40, this script tries to load various caching-related classes. When they all fail, the exception is thrown.

Solution: Remove object-cache.php

  • When I remove file /wp-content/object-cache.php, the error disappears. I believe this file is a drop-in replacement for native WordPress caching. Am I supposed to replace it with some original file, or just leave it like this?
  • In the same directory, there is a file advanced-cache.php, that also seems related to Redis or whatever. It seems I can also remove that (=changed the name).

See also