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.

  • How did you installed wp-cli? I always install it using $ composer global require and just updated it to 0.24.1. No issues with PHP 7.0.10 for me on Mint 17.3
    – Z. Zlatev
    Commented Aug 26, 2016 at 6:56
  • I used the phar...
    – Ipstenu
    Commented Aug 26, 2016 at 15:57

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.

  • Update - There was a minor PHP update to my server last night (php was rebuilt) and now it's working again. Ergo - Something was wrong in PHP 7.0.10. I noticed that the php -v changed from PHP 7.0.10 (cgi-fcgi) to PHP 7.0.10 (cli) so my theory is that CentOS was drunk and decided to use cgi on cli instead of ... cli.
    – Ipstenu
    Commented Aug 26, 2016 at 15:58
  • Thanks for answering me both here and the Github issue I opened up. I agree with that theory, or possibly it was cPanel's EA4 choosing the wrong variant earlier this week. Definitely happy that this is back to how it should. Commented Aug 26, 2016 at 18:52
  • Ooooh you're also on EA4? I think we have our culprit, sir! I'll pass that on to my friend at cPanel.
    – Ipstenu
    Commented Aug 26, 2016 at 21:26
  • Yep! While I'm not on my personal server, my work servers have cPanel on a few, and this is the first one using CentOS 7 and EA4 (so new there's no live sites on it yet). I think this was just a one-time slip-up as the initial 7.0.9 worked fine, but this is the first update I've seen since setting up this server (I didn't know they updated the security versions of PHP automatically with EA4, a pleasant surprise!). If you are in contact w/ someone at cPanel, that sounds like a good idea so they're aware and can prevent it in the future. Commented Aug 27, 2016 at 13:36

Your Answer

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

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