pestle icon indicating copy to clipboard operation
pestle copied to clipboard

Call to undefined function Pulsestorm\Pestle\Runner\main()

Open anggakes opened this issue 8 years ago • 6 comments

Fatal error: Call to undefined function Pulsestorm\Pestle\Runner\main() in /var/www/html/prosehat/pestle.phar on line 7

i'm very new with .phar file. step I have done :

  1. curl -LO http://pestle.pulsestorm.net/pestle.phar
  2. php pestle.phar list

I got that error when using pastle.phar, can you help me ? thanks

anggakes avatar Jun 14 '16 05:06 anggakes

@anggakes Thanks for giving pestle a try! Can you let us know which version of PHP you're running? You can figure ou;t which version of PHP you're using by running the php -v command. With this information, we'll be better able to help you.

astorm avatar Jun 14 '16 15:06 astorm

I'm using hip-hop virtual machine (hhvm) - 3.13.1 on Apache 2 engine Is hhvm not currently support .phar file ?

anggakes avatar Jun 14 '16 21:06 anggakes

@anggakes Could you paste in the full contents of running $ php -v?

astorm avatar Jun 14 '16 22:06 astorm

@anggakes I was able to reproduce the problem on hhvm -- it looks like you're not alone. I'd recomend using stock PHP to run pestle.phar until we know more about the issue.

https://github.com/facebook/hhvm/issues/5139

Thank you for reporting -- I wouldn't have known about this otherwise!

astorm avatar Jun 15 '16 00:06 astorm

Thank you for your response, so the problem is from hhvm.

Thanks alan

anggakes avatar Jun 15 '16 00:06 anggakes

Hi Alan,

Thanks for discovering PESTLE. I am very new to phar and not very much adroit in commands. I am using

  1. PHP 7.0.23 (cli)
  2. Apache 2.4.27
  3. WAMP sever 3.1.0

My magento installation is under

C:/wamp/www/

with the name of the folder magento220 (version is 2.2.0). I am using cygTerminal to run cUrl commands in windows 10 by the help of which I downloaded the latest version of pestle under

C:/wamp/

and now from this path in cygTerminal when I run the command

php pestle.phar list-commands

it works fine here and shows all of the available commands but when I use

php pestle.phar generate_module Pulsestorm HelloPestle 0.0.1

it gives me the error

Could not find base Magento directory

Now when I cut pestle from current path and paste it in

C:/wamp/www/

and give another try it throws the errors and warnings like

Warning: require_once(phar://C:/wamp/pestle.phar/modules/pulsestorm/magento2/cli/generate/module/module.php): failed to open stream: phar error: invalid url or non-existent phar "phar://C:/wamp/pestle.phar/modules/pulsestorm/magento2/cli/generate/module/module.php" in phar://C:/wamp/www/pestle.phar/modules/pulsestorm/pestle/runner/module.php on line 136

Fatal error: require_once(): Failed opening required 'phar://C:/wamp/pestle.phar/modules/pulsestorm/magento2/cli/generate/module/module.php' (include_path='phar://C:/wamp/www/pestle.phar/vendor/phing/phing/classes;.;C:\php\pear') in phar://C:/wamp/www/pestle.phar/modules/pulsestorm/pestle/runner/module.php on line 136

again when I cut pestle from current path and paste it in

C:/wamp/www/magento220

and give another try it throws the errors and warnings like

Warning: require_once(phar://C:/wamp/pestle.phar/modules/pulsestorm/magento2/cli/generate/module/module.php): failed to open stream: phar error: invalid url or non-existent phar "phar://C:/wamp/pestle.phar/modules/pulsestorm/magento2/cli/generate/module/module.php" in phar://C:/wamp/www/magento220/pestle.phar/modules/pulsestorm/pestle/runner/module.php on line 136

Fatal error: require_once(): Failed opening required 'phar://C:/wamp/pestle.phar/modules/pulsestorm/magento2/cli/generate/module/module.php' (include_path='phar://C:/wamp/www/magento220/pestle.phar/vendor/phing/phing/classes;.;C:\php\pear') in phar://C:/wamp/www/magento220/pestle.phar/modules/pulsestorm/pestle/runner/module.php on line 136

Can you please guide me in this regard that where should I put pestle.phar and is there any environment variable I need to setup?

Thanks in advance.

Vishal2811 avatar Apr 30 '18 11:04 Vishal2811