Hi,
When i try to install Horizon on windows dev machine it gives following error
~~~
Problem 1
- Installation request for laravel/horizon dev-master -> satisfiable by laravel/horizon[dev-master].
- laravel/horizon dev-master requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
~~~
But pcntl is not available for windows
How to install without pcntl.
Can we use pthreads https://github.com/krakjoe/pthreads
instead of pcntl
pthreads supports windows ,mac,linux
Sorry no plans for this at the moment :) I suggest that you use something like Laravel Homestead and run a virtual machine where you can use Ubuntu.
@john5db The very talented developer of Laragon has ported the extension (more or less, it's still experimental at this point) to windows, you can get it here: https://forum.laragon.org/topic/593/how-to-add-pcntl-extension-windows
Latest release 1.0.5 have a new windows issue making it impossible to install.
I successfully fixed the PCNTL issue using @JapSeyz solution (Horizon 1.0.0).
Now, on 1.0.5, I'm missing the POSIX PHP extension:
Problem 1
- Installation request for laravel/horizon v1.0.5 -> satisfiable by laravel/horizon[v1.0.5].
- laravel/horizon v1.0.5 requires ext-posix * -> the requested PHP extension posix is missing from your system.
I'm running PHP 7.1.9, but PHP posix seems unavailable for Windows.
@themsaid @mtx-z yup I am stuck here on the posix issue issue as well. Is there a a strong need for this extension for some reason?
@themsaid you are right, but what if I'm using Homestead already.
This broke my workflow, cause I can't use composer commands directly in IDE anymore.
if you just developing on windows and deploying on linux use --ignore-platform-reqs with your composer command, this will still install horizon you still see the dashboard but its useless on windows.
Instead using 'php artisan horizon', try:
php artisan queue:listen --queue=default,mongodb,special
where default,mongodb,special are your queue names - put all of them
but, this way, sometimes, you will have to exit the command and comeback (cache issues)
Check https://github.com/laravel/horizon/issues/154
composer require laravel/horizon --ignore-platform-reqs
php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"
Most helpful comment
if you just developing on windows and deploying on linux use --ignore-platform-reqs with your composer command, this will still install horizon you still see the dashboard but its useless on windows.