"php occ" fails to run from CentOS7 shell prompt

UPDATE 27-December-2016:
OK I figured it out. If you’re running CentOS and if your PHP packages install to the /opt/rh/ folders, then you must type the entire path to the php executable. Here are some examples which finally work for me:

sudo -r apache /opt/rh/php55/root/bin/php occ maintenance:mode --on
sudo -r apache /opt/rh/php55/root/bin/php occ upgrade
sudo -r apache /opt/rh/php55/root/bin/php occ maintenance:mode --off

      • ORIGINAL THREAD - - -
        I installed Nextcloud according to the manuals. But my cli is reporting PHP 5.4 so I cannot manually run the OCC commands. What is the generally accepted method to fix this? Do I “yum remove” the four base PHP packages?

“yum remove php-common” has removed PHP 5.4. But now I get “command not found” upon running “php -v” on the cli. Nextcloud is still running fine. If I run “source /opt/rh/php55/enable” then the current session temporarily has PHP 5.5 until I log out. But the OCC commands don’t work because they’re tied to the apache user.

Any insight you may have would be much appreciated.