Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Can't run wp-cli.php via SSH #5699

@ihorlv

Description

@ihorlv

Can't run wp-cli.phar via ssh on the https://www.ionos.com/ shared hosting.
Getting this error output:

(uiserver):uxxxxxxx:~$ ./wp-cli.phar
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Undefined constant &quot;WP_CLI\Utils\STDOUT&quot; in phar:///homepages /33/dxxxxxxx/htdocs/wp-cli.phar/vendor/wp-cli/wp-cli/php/utils.php:1198
Stack trace:
#0 phar:///homepages/33/dxxxxxxx/htdocs/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(910): WP_CLI\Utils\isPiped()
#1 phar:///homepages/33/dxxxxxxx/htdocs/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/InitializeColorization.php(23): WP_CLI\Runner-&gt;init_colorization()
#2 phar:///homepages/33/dxxxxxxx/htdocs/wp-cli.phar/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\InitializeColorization-&gt;process(Object(WP_CLI\Bootstrap\BootstrapState))
#3 phar:///homepages/33/dxxxxxxx/htdocs/wp-cli.phar/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
#4 phar:///homepages/33/dxxxxxxx/htdocs/wp-cli.phar/php/boot-phar.php(11): include('phar:///homepag...')
#5 /homepages/33/dxxxxxxx/htdocs/wp-cli.phar(4): include('phar:///homepag...')
#6 {main}
thrown in <b>phar:///homepages/33/dxxxxxxx/htdocs/wp-cli.phar/vendor/wp-cli/wp-cli/php/utils.php</b> on line <b>1198</b><br />

On my desktop Debian Linux, everything works OK.
This is the list of the IONOS server's shared variables

SHELL=/bin/bash
HISTCONTROL=ignoreboth
EDITOR=vi
PWD=/kunden/homepages/33/dxxxxxxxx/htdocs
LOGNAME=uxxxxxxx
MC_TMPDIR=/tmp/mc-uxxxxxx
MC_SID=5843
HOME=/kunden/homepages/33/dxxxxxxx/htdocs
LANG=en_US.UTF-8
SSH_CONNECTION=10.71.xxx.xxx 25612 74.208.xxx.xxx 22
TERM=xterm-256color
USER=uxxxxxxxx
DISPLAY=:0.0
SHLVL=2
SSH_CLIENT=10.71.xxx.xxx 25612 22
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
MAIL=/var/mail/uxxxxxx
SSH_TTY=/dev/pts/0
_=/usr/bin/env

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions