Almost always the reason will be that the php.so file is missing but also that php.conf is misconfigured.
In the problem machine it is actually PHP7 installed so if you reference PHP5 of course things wil be broken!
Take for example here:
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamica........