I have 3 accounts, where I phpinfo(); only shows PHP Version 5.6.31, no matter what I do. In siteworx it shows PHP Version: PHP-FPM 7.1.7, on the User shell entering php -v I get PHP 7.1.7 - so phpinfo is wrong.
But all other accounts on the same server always show the correct versions, only these 3 fail. I checked the vhost files, htacess, redirects, permisssione etc. And I tried all php versions, back and forth
Your server apparently has multiple versions of PHP installed, and when you login and run php on the command line, you are getting the older version which is installed to usr, bin, php UPSers.