Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Fix the issue of run the queue with Drush from ReactPHP Eventloop #2

Closed
kylehuynh205 opened this issue Sep 10, 2021 · 1 comment · Fixed by #5
Closed

Fix the issue of run the queue with Drush from ReactPHP Eventloop #2

kylehuynh205 opened this issue Sep 10, 2021 · 1 comment · Fixed by #5
Assignees
Labels
bug Something isn't working

Comments

@kylehuynh205
Copy link
Contributor

kylehuynh205 commented Sep 10, 2021

Problem: when deploy the module in Apache server, have to modify $environment = new Environment(Path::getHomeDirectory(), $cwd, $autoloadFile); to $environment = new Environment("/var/www/html/drupal", $cwd, $autoloadFile); so the drush command is able to run.

Reason: when run Drush from PHP, the function Path::getHomeDirectory() return null from PHP

/var/www/html/drupal/vendor/drush/drush/drush --root=/var/www/html/drupal --uri=http://localhost:8000 advancedqueue:queue:process blazegraph PHP Fatal error: Uncaught RuntimeException: Your environment or operation system isn't supported in /var/www/html/drupal/vendor/webmozart/path-util/src/Path.php:257 Stack trace: #0 /var/www/html/drupal/vendor/drush/drush/drush.php(62): Webmozart\PathUtil\Path::getHomeDirectory() #1 /var/www/html/drupal/vendor/drush/drush/drush(4): require('/var/www/html/d...') #2 {main} thrown in /var/www/html/drupal/vendor/webmozart/path-util/src/Path.php on line 257

Similar issue report:
hechoendrupal/drupal-console-core#255
webmozart/path-util#24

Potential fixes: webmozart/path-util@52e8858

@kylehuynh205
Copy link
Contributor Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant