I set up WP-CLI on a new server this past Monday, which worked as expected and scripts I’ve made worked following with no issue. Yesterday, running the same script gave errors:


PHP Warning: array_slice() expects parameter 1 to be array, null given in phar:///usr/local/bin/wp/php/WP_CLI/Runner.php on line 610
PHP Warning: Invalid argument supplied for foreach() in phar:///usr/local/bin/wp/php/WP_CLI/Configurator.php on line 132
PHP Warning: proc_open(): Descriptor item must be either an array or a File-Handle in phar:///usr/local/bin/wp/php/commands/help.php on line 111
PHP Warning: proc_close() expects parameter 1 to be resource, boolean given in phar:///usr/local/bin/wp/php/commands/help.php on line 111
Content-type: text/html; charset=UTF-8

Even when running --info I get nothing:


wp --info --allow-root
Content-type: text/html; charset=UTF-8

I’m at a loss, as 0.24.1 was working fine earlier in the week. It does look like PHP was updated from 7.0.9 to 7.0.10 in-between when it worked and when it stopped. However all of the permissions and location of the phar within /usr/local/bin/ remained the same. I was wondering if anyone could point me in a direction where I can further troubleshoot this.

1 Answer
1

I’ve run into the same problem. It worked on Saturday. This Monday it auto-upgraded to 7.0.10, now it breaks. I don’t have a fix, so here’s more information that MAY help debugging?

I’m on CentOS7 with cPanel’s EA brand of PHP.

PHP 7.0.10 (cgi-fcgi) (built: Aug 22 2016 20:34:53)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.10, Copyright (c) 1999-2016, by Zend Technologies

I’ve tried reinstalling PHP and wp-cli to no avail.

Tags:

Leave a Reply

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