drush-ops / drush

Drush is a command-line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those who spend their working hours hacking away at the command prompt.
https://www.drush.org
2.34k stars 1.08k forks source link

Unknown: Failed opening required 'phar:///usr/local/bin/drush8/commands/runserver/d7-rs-router.php' #3162

Open kenorb opened 6 years ago

kenorb commented 6 years ago
$ drush8 --version
count(): Parameter must be an array or an object that implements Countable Table.php:789                                                           [warning]
 Drush Version   :  8.1.13 
docroot $ drush8 rs
HTTP server listening on 127.0.0.1, port 8888 (see http://127.0.0.1:8888/), serving site default, logged in as ntdrupal...
PHP 7.2.0beta1 Development Server started at Mon Nov 13 15:06:46 2017
Listening on http://127.0.0.1:8888
Document root is /Users/myuser/Sites/docroot
Press Ctrl-C to quit.
[Mon Nov 13 15:11:34 2017] PHP Warning:  Unknown: failed to open stream: phar error: invalid url or non-existent phar "phar:///usr/local/bin/drush8/commands/runserver/d7-rs-router.php" in Unknown on line 0
[Mon Nov 13 15:11:34 2017] PHP Fatal error:  Unknown: Failed opening required 'phar:///usr/local/bin/drush8/commands/runserver/d7-rs-router.php' (include_path='.:') in Unknown on line 0
[Mon Nov 13 15:11:34 2017] PHP Warning:  Unknown: failed to open stream: phar error: invalid url or non-existent phar "phar:///usr/local/bin/drush8/commands/runserver/d7-rs-router.php" in Unknown on line 0
[Mon Nov 13 15:11:34 2017] PHP Fatal error:  Unknown: Failed opening required 'phar:///usr/local/bin/drush8/commands/runserver/d7-rs-router.php' (include_path='.:') in Unknown on line 0

Same when I've renamed drush8 into drush.


Same with v8.1.15:

$ wget https://github.com/drush-ops/drush/releases/download/8.1.15/drush.phar -O /usr/local/bin/drush8
$ chmod +x /usr/local/bin/drush8
$ drush8 --version
count(): Parameter must be an array or an object that implements Countable Table.php:789                                                           [warning]
 Drush Version   :  8.1.15 
$ drush8 rs
...
[Mon Nov 13 15:22:21 2017] PHP Warning:  Unknown: failed to open stream: phar error: invalid url or non-existent phar "phar:///usr/local/bin/drush8/commands/runserver/d7-rs-router.php" in Unknown on line 0
[Mon Nov 13 15:22:21 2017] PHP Fatal error:  Unknown: Failed opening required 'phar:///usr/local/bin/drush8/commands/runserver/d7-rs-router.php' (include_path='.:') in Unknown on line 0
[Mon Nov 13 15:22:22 2017] PHP Warning:  Unknown: failed to open stream: phar error: invalid url or non-existent phar "phar:///usr/local/bin/drush8/commands/runserver/d7-rs-router.php" in Unknown on line 0
[Mon Nov 13 15:22:22 2017] PHP Fatal error:  Unknown: Failed opening required 'phar:///usr/local/bin/drush8/commands/runserver/d7-rs-router.php' (include_path='.:') in Unknown on line 0
chaps2 commented 6 years ago

I had the same problem with 8.1.15 using the default global install method (phar). As a work around, use the global composer install method - http://docs.drush.org/en/8.x/install-alternative/.

jonathan1055 commented 1 year ago

I've just got the same thing with drush 8.4.11 (the latest drush8).

PHP Warning:  Unknown: Failed to open stream: phar error:
invalid url or non-existent phar 'phar:///usr/local/bin/drush8/commands/runserver/d7-rs-router.php'
in Unknown on line 0

I am trying to test/maintain a local d7 site. I am not using the launcher, and downloaded via the usual https://docs.drush.org/en/8.x/install/ expect I added '8' to the target in sudo mv drush.phar /usr/local/bin/drush8. I have checked a few other drush commands and they run fine.