Back

Missing horizon artisan commands when forcing php version via /usr/bin/php -ea_php 71 ./artisan


Hi everyone

So here is the situation, I'm running my application (version 5.5) on a server where there are a bunch of other sites. I've used MultiPhpManager of cpanel to specify php 7.1 for the project and that works no problem, I can also run commands in the terminal as any php version by running /usr/bin/php -ea_php {version here} and the site itself is running no problem, the issue comes in with horizon, or artisan list for that matter.

If I just run php artisan list (which uses the default php version, currently 7.0) , I get a list of all the horizon commands:

  • horizon:assets Re-publish the Horizon assets
  • horizon:continue Instruct the master supervisor to continue processing jobs
  • horizon:list List all of the deployed machines
  • horizon:pause Pause the master supervisor
  • horizon:purge Terminate any rogue Horizon processes
  • horizon:snapshot Store a snapshot of the queue metrics
  • horizon:supervisors List all of the supervisors
  • horizon:terminate Terminate the master supervisor so it can be restarted

But I can not run php artisan horizon, as by default the server attempts to run it as php 7.0, so it then fails with:

Call to undefined function Laravel\Horizon\Console\pcntl_async_signals()

If I then run /usr/bin/php -ea_php 71 ./artisan list I only have one horizon command listed:

 horizon:snapshot     Store a snapshot of the queue metrics

So for some reason, if I specify the php version, but use the same artisan file, the other horizon commands are missing.

Any suggestions would be appreciated, I've been trying to figure it out all day.

Thanks :)


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us