grota / drush-psysh

Integration of psysh into Drush so that you can have a Drupal REPL
17 stars 4 forks source link

error after installation #2

Open btopro opened 10 years ago

btopro commented 10 years ago

When I followed the instructions on my local server, no issue. On a staging box when I run drush @myalias repl I get the following error (it prints 3x in a row, same error over and over)

Psy Shell v0.1.0-dev (PHP 5.3.3 — cli) by Justin Hileman PHP Fatal error: Call to undefined function Psy\ExecutionLoop\posix_getpid() in /home/btopro/.drush/drush-psysh/vendor/psy/psysh/src/Psy/ExecutionLoop/ForkingLoop.php on line 119

Fatal error: Call to undefined function Psy\ExecutionLoop\posix_getpid() in /home/btopro/.drush/drush-psysh/vendor/psy/psysh/src/Psy/ExecutionLoop/ForkingLoop.php on line 119 Drush command terminated abnormally due to an unrecoverable error. [error] Error: Call to undefined function Psy\ExecutionLoop\posix_getpid() in /home/btopro/.drush/drush-psysh/vendor/psy/psysh/src/Psy/ExecutionLoop/ForkingLoop.php, line 119

Is there a minimum php requirement to run this?

btopro commented 10 years ago

this helped at least get it working though issue #3 may or may not be related

adding: <?php

return array('pager' => 'more', 'usePcntl' => false);

to my .psysh/rc.php file appears to have at least let it run

Pythagory commented 10 years ago

I was able to reproduce this on a CentOS system. The error's coming from PsySH itself not detecting that PHP doesn't have Posix support. Your solution in editing rc.php is correct according to the PsySH documentation. Alternately, your distribution may have a php-process library available to enable Posix support.