Two possibilities (guessing, because googling doesn’t want to tell me):
- PHP was built against an older version of Apache. If you aren’t using mod_php (which you definitely should not be), it doesn’t matter what version it’s build against, as it only gets proxied through Apache via fcgid or php-fpm. You updated Apache but the PHP packages were all built against the CentOS standard version of Apache.
- You have two Apache versions installed. CentOS 7 has 2.4.6, right? So, 2.4.37 is either from a third party repo (maybe OK) or a from-source install (probably too risky, I’d advise against it).
Or…maybe .you’re running CentOS 8? That has Apache 2.4.37. I don’t know why PHP would report Apache 2.4.6. phpinfo() on my CentOS 8 system doesn’t show a version in SERVER_SOFTWARE. Just says “Apache” (but, maybe it depends on how it’s run).