Supervisor 解決 can't find command *

善良的死神發表於2019-07-04

通過 supervisorctl status 檢視,發現出現 can't find command 'php'

  1. 檢視 supervisor 的執行狀態

    kqVNhmcvM0.png!large
  2. ini 配置檔案

    aJ8GZ7x1aI.png!large

執行 command=php artisan queue:work --queue=test_queue --tries=3 的時候找不到 php 命令

  1. 檢視 php 的執行目錄 which php

  2. ini 配置檔案的 command 的 php 加上絕對路徑

    hSmmCov828.png!large
  3. 重新載入一下 Supervisor

    supervisorctl reload


按道理我 PHP 的 bin 目錄已經加在了 全域性變數 裡面,應該是可以執行的,難道是執行使用者的問題?

相關文章