I recently upgraded the PHP version on 3 production servers to 7.4, along with MySQL and Apache2. Today we learned that one of the websites is still showing 7.2 in phpinfo()
, despite php -v
showing 7.4 at the CLI. I checked the .conf
file for the site (/etc/apache2/sites-available/site1.your_domain.conf
), but it doesn't show what I expected it to, namely it doesn't mention a PHP version at all. I figured there'd be something like this example:
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php/php7.0-fpm.sock|fcgi://localhost"
</FilesMatch>
But no, the <FilesMatch>
section of the .conf
file for my site says this:
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
There's no mention of the PHP version anywhere in the site .conf
file. I was under the impression that if SetHandler
wasn't set that the site would default to the webserver default (7.4). So what is keeping it at 7.2?
I'm kind of at a loss as to where to look now. My Google-fu is failing me. Every search I try simply tells me how to change the CLI version of PHP or set the above settings in the VirtualHost
section of the individual site config using SetHandler
. Nothing that seems to apply to my situation unless I'm missing something. Any ideas? Thanks ahead of time.