Closed GwynethLlewelyn closed 3 years ago
Hi @GwynethLlewelyn, i haven’t tested php8.0 with gitsync yet but I’m glad to see someone is!
Usually that’s what I do myself, restart php/apache or nginx and that takes care of caches holding on too tightly.
One thing you could try is to go in <GRAV_PATH>/user/plugins/git-sync
, remove (backup) the vendor folder and then run a composer install —no-dev
. See if that helps.
Whoops I'm so sorry; I had totally forgotten that I had opened this issue...!
Aye, it 'fixed by itself' — I don't remember doing anything, but there were Grav upgrades, OS upgrades, PHP upgrades, a few reboots... one of those must have fixed whatever the issue was, since I haven't seen it showing up ever again!
No worries I figured as much, I was just doing some house cleaning with the new release out :)
Thanks for the update and glad it is sorted. 👍
Hi all!
I've been busily upgrading many of my sites to PHP 8.0, and, having learned that Grav 1.7 fully supports PHP 8.0, I did the upgrade without thinking twice.
It seems, however, that
git-sync
has some trouble:Now, as far as I could search on Google or Bing about this particular issue, it seems to be common when upgrading PHP versions — especially when one's configuration uses opcache, APC/APCu, Memcached, or whatever fancy caching methods. I use them all, and even run
nginx
with Google'spagespeed
library on top of everything — and, well, Cloudflare...In other words: because the compiled PHP scripts may be slightly different between PHP versions (especially major versions) — some opcodes having been made obsolete and dropped, others added, etc. — it is often likely for those levels of caching still contain some 'old' opcodes, thus the error. Strangely enough, in my case, they seem to persist not only when restarting
nginx
andphp8.0-fpm
(the latter accessed via a Unix socket), but even after a reboot — so something is maintaining persistence (I haven't tracked it down) at some point.Note that this is not a 'bug' or 'error' of
git-sync
per se. I have used thegrav
CLI to manually delete whatever cachesgrav
is using (including the so-called 'compiled' directory); but I'm afraid that this will not store low-level opcodes, and, thus, these won't be cached.This issue naturally affects other platforms as well. Here are some suggestions on how to force the opcode cache to be cleared in WordPress under Apache. Naturally enough, such deep-level cache flushing techniques ought to get rid of whatever is persisting the cache.
I wonder if anyone has come across this issue and has tweaked something in
git-sync
so that it flushes all opcode caches whenever something gets upgraded.Thanks in advance!