<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>cli application on Tutes Club</title><link>https://tutes.in/tag/cli-application/</link><description>Recent content in cli application on Tutes Club</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 01 Feb 2019 13:05:33 +0000</lastBuildDate><atom:link href="https://tutes.in/tag/cli-application/index.xml" rel="self" type="application/rss+xml"/><item><title>Fix Magento 2 – php cli error on cpanel or other hostings</title><link>https://tutes.in/fix-magento-2-php-cli-error-on-cpanel-or-other-hostings/</link><pubDate>Mon, 10 Sep 2018 22:10:59 +0000</pubDate><guid>https://tutes.in/fix-magento-2-php-cli-error-on-cpanel-or-other-hostings/</guid><description>&lt;h2 id="the-problem"&gt;The problem:&lt;/h2&gt;
&lt;p&gt;On a fresh install of Magento2 on cpanel based hosting, you receive the following error while running any command on SSH&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;[&lt;/span&gt;eee@e1 www&lt;span class="o"&gt;]&lt;/span&gt;$ php bin/magento cache:clean
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;X-Powered-By: PHP/7.0.31
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Content-type: text/html&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;UTF-8
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bin/magento must be run as a CLI application
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;[&lt;/span&gt;eee@e1 www&lt;span class="o"&gt;]&lt;/span&gt;$ php bin/magento setup:upgrade
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;X-Powered-By: PHP/7.0.31
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Content-type: text/html&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;UTF-8
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bin/magento must be run as a CLI application
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="the-solution"&gt;The Solution:&lt;/h2&gt;
&lt;p&gt;You have to point php to correct binary;&lt;br&gt;
Use the following code in order:&lt;br&gt;
First, open the file which can alter the runtime variables like &lt;code&gt;.bash_profile&lt;/code&gt; or &lt;code&gt;.bashrc&lt;/code&gt;&lt;/p&gt;</description></item></channel></rss>