Hello,

I have given a detailed outline of my issue as well as configuration, links to 
posts from other users with the same issue, and attempted fixes here: 
https://serverfault.com/questions/1108437/why-are-my-2-sites-on-the-same-server-randomly-switching-php-versions-with-ph
 I'm not sure if it's worth reposting in its entirety here.

To summarise, when on Debian 9, 10, and 11 systems and using Apache 2.4.53/54, 
with PHP FPM and Linux sockets I'm encountering an issue with SetHandler. If 
SetHandler is set in the Apache config file specific to a particular site then 
Apache will switch between the available PHP versions on the machine when 
refreshing a page, when using SetHandler in .htaccess files the switching 
doesn't occur.

What I mean by switching is that if loading a single index.php file on a single 
site when the contents of the file are only phpinfo(), sometimes I will see 
output for PHP8 and sometimes for 8.1.

If I set SetHandler to use localhost instead of a socket then the error doesn't 
occur there either, however that is a bit of a headache since I have many 
machines that are affected and it also doesn't explain why the sockets aren't 
working as they should.

Any help would be much appreciated!

Reply via email to