[SOLVED] PHP must be run as a CLI application error : Content-type: text/html; charset=UTF-8

php bin/magento cache:clean
Content-type: text/html; charset=UTF-8
bin/magento must be run as a CLI application

as root user, run the following commands (For php v7.0)

# yum install ea-php70
# source /opt/cpanel/ea-php70/enable

The solution involves fixing php variable’s path. We need to find which php is being used right now, you can find out by

$ which php
$ php -v

To fix this PHP cli error, see how to edit php in bash profile (.bashrc)


Posted

in

, ,

by

Tags:

Comments

One response to “[SOLVED] PHP must be run as a CLI application error : Content-type: text/html; charset=UTF-8”

  1. […] version, use which php or php -v command. If you think the cpanel configuration is the issue, fix EasyApache 4 PHP cli issue. With this way you can fix the setting and enable the new php […]

Leave a Reply

Your email address will not be published. Required fields are marked *