【PHP】Call to undefined function pcntl_fork()

問題


用 php cli 嘗試寫多執行續
結果遇到下面這個錯誤
Call to undefined function pcntl_fork()

解決


在configure的時候多帶一個參數
# ./configure --enable-pcntl
# make -j4
# make install
然後就可以使用了

留言