Easyapache 4 broke Drush
After upgrading one server to EA4 I've noticed a problem with drush. It won't work on my cPanel easy apache 4 server but will work fine on any other cPanel server running the same versions of everything except with EA3. I cannot figure out why.
I had drush installed prior to the update. I also have drush installed on other cPanel servers with the same version of cpanel/PHP etc. but with easyapache3
Drush works fine on my other identical servers (only difference being easyapache 3 vs 4)
On the EA4 server:
Running "drush" command as root just gives no output other than this:
Content-type: text/html; charset=UTF-8
Su'ing to a user and running drush results in:
PHP Warning: array_shift() expects parameter 1 to be array, null given in phar:///usr/local/bin/drush/includes/startup.inc on line 171
PHP Warning: Invalid argument supplied for foreach() in phar:///usr/local/bin/drush/includes/startup.inc on line 182
PHP Warning: pcntl_exec() expects parameter 2 to be array, null given in phar:///usr/local/bin/drush/includes/startup.inc on line 355
PHP Warning: fwrite() expects parameter 1 to be resource, string given in phar:///usr/local/bin/drush/includes/startup.inc on line 359
PHP Warning: fwrite() expects parameter 1 to be resource, string given in phar:///usr/local/bin/drush/includes/startup.inc on line 360
Content-type: text/html; charset=UTF-8
The install instructions for drush say to do this:
php -r "readfile(' drush
on the EA4 server this results in error:
Error in argument 1, char 2: option not found r
This is because the PHP command is missing the -r flag, while on other cpanel servers with exact same php build has -R option. It does the same using php-cli as well since php-cli is simply a symlink to the same php binary.
So it appears to me that you cannot install drush this way on a cPanel server running easyapache 4, and even if you copy the binary from a working server it does not work on the easyapache4 server.
-
Hi, We made a change that brings EA3 compatibility back in EA4, but we haven't yet added '/usr/local/bin/php' to point to php-cli yet. Can you test to see if this works by calling the PHP binary directly, without the wrapper? /opt/cpanel/ea-php##/root/usr/bin/php -r "readfile(' drush Could you let me know if that works? We hope to have a fix in place early next week to add the missing binary. I hope this helps! 0 -
Hi, We made a change that brings EA3 compatibility back in EA4, but we haven't yet added '/usr/local/bin/php' to point to php-cli yet. Can you test to see if this works by calling the PHP binary directly, without the wrapper? /opt/cpanel/ea-php##/root/usr/bin/php -r "readfile(' drush Could you let me know if that works? We hope to have a fix in place early next week to add the missing binary. I hope this helps!
The command executes without errors but writes a 0 byte drush file. I do seem to be able to run the drush command however using: /opt/cpanel/ea-php56/root/usr/bin/php /usr/local/bin/drush Doing so does display the regular drush output as expected0 -
Hi, Cool, that verifies the issue. We'll have this fixed ASAP. We're looking at case EA-5106. Thanks! 0 -
Hi, Cool, that verifies the issue. We'll have this fixed ASAP. We're looking at case EA-5106. Thanks!
Thank you for the quick reply. For now I believe it should work if I alias drush to use that php binary in bashrc alias drush='/opt/cpanel/ea-php56/root/usr/bin/php /usr/local/bin/drush'0
Please sign in to leave a comment.
Comments
4 comments