drush-psysh icon indicating copy to clipboard operation
drush-psysh copied to clipboard

error after installation

Open btopro opened this issue 11 years ago • 2 comments

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 avatar Feb 04 '14 18:02 btopro

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

adding:

'more', 'usePcntl' => false); to my .psysh/rc.php file appears to have at least let it run

btopro avatar Feb 04 '14 19:02 btopro

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.

Pythagory avatar Feb 04 '14 21:02 Pythagory