We have an old legacy PHP website that won't run on PHP greater than 5.4. It's on a shared hosting server with GreenGeeks.com and we have a cPanel 11 to control all our hosted sites. We've had to keep the default PHP level at 5.4 purely to keep this one legacy site running (there are multiple errors with > 5.4), but that can't go on, we need to upgrade the default PHP to the latest version.
Rewriting the legacy site isn't really an option unfortunately. I thought that if we set PHP level up to latest and add a directive in the .htaccess then that would work, so I've tried adding this into the .htaccess for the legacy site at the top of the file:
AddHandler application/x-httpd-php54 .php
And a number of other variations (I don't know much about htaccess) and the site still runs okay with them added, but as soon as I change the default PHP level for the entire platform to something higher I get this:
So my question is, is it possible in such a setup to have one website running PHP 5.4 and all the others running, say 7.2? And if so, what am I doing wrong?
Edit
I contacted GreenGeeks support and they inform me that only one PHP version can run per cPanel account, so overrides in .htaccess simply don't work.
If anyone has any workarounds that would be great but I think this is simply not possible.