I know about the
phpinfo() way but is there any other way? I'm using CentOS and I can't find the
httpd executable to run
The above check only includes the primary version number, not including the extended backport patches.
If you installed with yum you can:
yum list httpd
and get the full version (note the -31 / -47)