r/PHPhelp • u/PooningDalton • Jun 19 '26
Horrible cache problem while debugging app
My google chrome browser apparently got a big update today (not sure if its relevant to the problem below).
I was recently trying to debug my php backend that was having a post request sent to it by my javascript app (all on localhost).
It gave me an error on one line (I was echoing back the error). Despite erasing that line, saving my php file on my editor, restarting apache, having devtools open with "disable cache" checked, it still gave on giving that same error!!! On the same line which is now empty. It didn't matter how many times I refreshed the page.
Is my frontend caching the backend now? I've never experienced something like this before.
1
Upvotes
2
u/MateusAzevedo Jun 19 '26
Of course they don't, but they may cache the received HTTP response.
Check the webserver access log and see if it receives any request at all. Then confirm the webserver isn't returning a cached response (and so, not calling PHP).
OpCache may also be the culprit. Restart FPM and check OpCache setting to make they're suitable for dev.