astorm / pestle

A collection of command line scripts for Magento 2 code generation, and a PHP module system for organizing command line scripts.
MIT License
533 stars 101 forks source link

failed to open stream: phar error: invalid url or non-existent phar #508

Open itsazzad opened 4 years ago

itsazzad commented 4 years ago
PHP Warning:  require_once(phar:///home/<username>/pestle.phar/modules/pulsestorm/magento2/cli/help/module.php): failed to open stream: phar error: invalid url or non-existent phar "phar:///home/<username>/pestle.phar/modules/pulsestorm/magento2/cli/help/module.php" in phar:///usr/local/bin/pestle.phar/modules/pulsestorm/pestle/runner/module.php on line 136
PHP Fatal error:  require_once(): Failed opening required 'phar:///home/<username>/pestle.phar/modules/pulsestorm/magento2/cli/help/module.php' (include_path='phar:///usr/local/bin/pestle.phar/vendor/pear/numbers_words:phar:///usr/local/bin/pestle.phar/vendor/phing/phing/classes::/usr/share/kopano/php') in phar:///usr/local/bin/pestle.phar/modules/pulsestorm/pestle/runner/module.php on line 136
astorm commented 4 years ago

Thanks for giving pestle a try @itsazzad -- I presume that's an error you got when trying it out? That's certainly not intended behavior.

Could you let us know the following?

  1. Show us the command line invocation you were trying to use to run pestle.phar?
  2. Was this only with a single command, or every command?
  3. What version of PHP are you using?
  4. What OS are you running this on?
itsazzad commented 4 years ago

Hi @astorm ,

  1. I used the following commands from https://pestle.readthedocs.io/en/latest/:
    php pestle.phar
    chmod +x pestle.phar
    ./pestle.phar
    mv pestle.phar /usr/local/bin
    pestle.phar                   # assumes /usr/local/bin is in your $PATH

    so the last command pestle.phar was throwing the error.

  2. Now with every command similar errors
  3. PHP 7.2.26-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Dec 18 2019 14:58:00) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.26-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
  4. Ubuntu 18.04.3
itsazzad commented 4 years ago

@astorm After removing the temp folder seems to be working

/tmp/pestle_cache
astorm commented 4 years ago

Reopening this so we can take care of the issue so it doesn't happen for other people.