PHP – die besten Beiträge

Warum funktioniert FastCGI-Cache in nginx mit WordPress bei mir nicht?

Hallo zusammen,

ich versuche seit mehreren Tagen, bei einer WordPress-Seite FastCGI-Caching über nginx einzurichten – ohne Erfolg.
Ich habe einen eigenen VPS (Ubuntu 22.04, Plesk, nginx als Webserver), die Seite läuft auf PHP 8.3 + WordPress (Hello Elementor Theme).

Ich habe wirklich alles ausprobiert – kurz zusammengefasst:

Was funktioniert:
Eine test.php-Datei wird korrekt gecached (zeigt X-Cache-Status: HIT)
nginx-Konfiguration ist syntaktisch korrekt (nginx -t = ok)
Cache-Ordner ist vorhanden (/var/cache/nginx/wordpress) und www-data bzw. nginx gehört der Ordner
fastcgi_cache_key, fastcgi_cache_path etc. alles sauber gesetzt
Testweise WP_CACHE aktiviert und Redis komplett deaktiviert
Alle JetEngine- und Crocoblock-Plugins deaktiviert
Auch andere Caching-Plugins wie WP Super Cache, FlyingPress etc. getestet → kein HIT, nur MISS
functions.php auf Sessions geprüft – kein session_start() vorhanden

Was NICHT funktioniert:
Normale WordPress-Seiten (auch eigens angelegte Cache-Testseite /cachetest/) werden niemals gecached (immer X-Cache-Status: MISS)
Auch wenn ALLE Plugins deaktiviert sind → weiterhin MISS
Auch mit angepasstem headers_list() sehe ich, dass WordPress immer Set-Cookie + PHPSESSID setzt

Ich wäre so dankbar über Hilfe.
Weiß langsam echt nicht mehr weiter - danke!

Beste Grüße,
Stefan

Homepage, Linux, Webseite, WordPress, CMS, PHP, Webserver, Cache, Elementor

NC Appinstallation macht Server unstabil, aber über OCC nicht?

Hi, ich habe meine eigene NextCloud aufgesetzt, habe aber das Problem, dass bei Appinstallationen folgender Fehler kommt:

Fehler: Diese App kann nicht aktiviert werden, da sie den Server instabil macht.

Komischerweise ist das bei jeder App, die ich eigentlich sollte installieren können. Auch bemerkenswert ist, dass ich direkt nach dem Fehler die App über OCC aktivieren kann, und dann funktioniert es auch normal.

Wisst ihr, wie das Problem löse (ist für mich zu umständlich, jedes mal in OCC was reinzutippen)?

Noch paar Informationen zu meiner Cloud:

  • Ich nutze Debian
  • NC wird über nginx mit php8.2 gehostet
  • Ich nutze die Version 31.0.5

Ich bin mir nicht sicher, ob dass der Fehler ist:

{"reqId":"rwc6dis5v4lscj8l3LTP","level":0,"time":"2025-05-15T14:23:50+02:00","remoteAddr":"192.168.178.20","user":"Robin","app":"no app in context","method":"GET","url":"/ocs/v2.php/a
pps/notifications/api/v2/notifications","message":"dirty table reads: SELECT `name` FROM `*PREFIX*authtoken` WHERE (`uid` = :dcValue1) AND (`last_activity` >= :dcValue2)","userAgent":
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","version":"31.0.5.1","exception":{"Exception":"Exception","Message":"dirty tabl
e reads: SELECT `name` FROM `*PREFIX*authtoken` WHERE (`uid` = :dcValue1) AND (`last_activity` >= :dcValue2)","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/DB/ConnectionAd
apter.php","line":50,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":289,"function
":"executeQuery","class":"OC\\DB\\ConnectionAdapter","type":"->"},{"file":"/var/www/nextcloud/apps/notifications/lib/Service/ClientService.php","line":37,"function":"executeQuery","cl
ass":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/notifications/lib/Controller/EndpointController.php","line":92,"function":"hasTalkDesktop","cla
ss":"OCA\\Notifications\\Service\\ClientService","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"listNotifications","clas
s":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController
","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\H
ttp\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":307,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nex
tcloud/ocs/v1.php","line":49,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":7,"args":["/var/www/nextcloud/ocs/v1.php"],"fun
ction":"require_once"}],"File":"/var/www/nextcloud/lib/private/DB/Connection.php","Line":406,"message":"dirty table reads: SELECT `name` FROM `*PREFIX*authtoken` WHERE (`uid` = :dcVal
ue1) AND (`last_activity` >= :dcValue2)","tables":["oc_authtoken"],"reads":["oc_authtoken"],"exception":{},"CustomMessage":"dirty table reads: SELECT `name` FROM `*PREFIX*authtoken` W
HERE (`uid` = :dcValue1) AND (`last_activity` >= :dcValue2)"}}

Falls ihr noch mehr Informationen bräuchtet, gerne fragen und danke im Voraus!

App, Installation, PHP, Fehlermeldung, Debian, nginx, Nextcloud

Meistgelesene Beiträge zum Thema PHP