0

I see the same output regardless which input parameters I pass to wp-cli.

[tosh@server94]$ wp-cli.phar --info
X-Powered-By: PHP/5.4.36
Content-type: text/html

[tosh@server94]$ wp-cli.phar help cache
X-Powered-By: PHP/5.4.36
Content-type: text/html

What is going on?

Update in response to Answer

There seems to be 2 PHP "installations" on my host's server. None of them works, it seems. The first one, with cgi, has the above symptoms. The second one, cli version, outputs nothing.

[userx@server921 jack]$ /usr/bin/php wp-cli.phar --info
X-Powered-By: PHP/5.5.33
Content-type: text/html

[userx@server921 jack]$ /usr/bin/php -v
PHP 5.5.33 (cgi-fcgi) (built: Mar  3 2016 10:03:52)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.1.1, Copyright (c) 2002-2016, by ionCube Ltd.
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Zend Guard Loader v3.3, Copyright (c) 1998-2014, by Zend Technologies
    with Suhosin v0.9.37.1, Copyright (c) 2007-2014, by SektionEins GmbH
[userx@server921 jack]$ php -v
PHP 5.5.33 (cli) (built: Mar  3 2016 10:03:51)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.1.1, Copyright (c) 2002-2016, by ionCube Ltd.
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Zend Guard Loader v3.3, Copyright (c) 1998-2014, by Zend Technologies
    with Suhosin v0.9.37.1, Copyright (c) 2007-2014, by SektionEins GmbH
[userx@server921 jack]$ php wp-cli.phar --info
[userx@server921 jack]$

1 Answer 1

3

Try running php wp-cli.phar

EDIT

It looks a little like php on your system isn't setup to use php-cli (it's using php-cgi instead):

try running: php -v

on my machine I get:

PHP 5.5.9-1ubuntu4.14 (cli) (built: Oct 28 2015 01:34:46) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

The important bit is where it says (cli) - this means it's the cli, and not cgi version.

3
  • if you think that is the problem (and you are probably right) just write it as an answer ;) the world will not come to an end if the answer will be wrong Apr 7, 2016 at 10:28
  • Thanks @MarkKaplun - I've updated it with extra info now too!
    – David Kemp
    Apr 7, 2016 at 10:41
  • @DavidKemp Please see update in the Question above.
    – Tosh
    Apr 8, 2016 at 4:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.