Website downloads instead of displaying

Recently I noticed a few sites had a page download instead of displaying when they were working perfectly fine before. I’m not 100% sure why but in my case the fix was to go into Virtualmin and toggle the PHP Version to some other version and back to my current one. I don’t know exactly what it changed, maybe it refreshed some config files somewhere. But it works and I wanted to make a note of it here in case it happens again.