環境
centos7
thinkphp 5.0
think-worker 1.0.1
Workerman version:3.5.30
PHP version:5.6.9
thinkphp 5.0使用workerman,啟動workerman服務端報錯
pcntl_signal() has been disabled for security reasons in file /www/wwwroot/shop/vendor/workerman/workerman/Worker.php on line 1107 pcntl_fork() has been disabled for security reasons in file /www/wwwroot/shop/vendor/workerman/workerman/Worker.php on line 1514
問題原因:pcntl_signal、pcntl_fork 等系列函數被禁用了
解決方案:找到 php.ini 文件並定位到 disable_functions 字段,將其后的 pcntl_signal、pcntl_fork等系列函數刪掉。
寶塔面板操作步驟:軟件商店(已安裝) -> PHP5.6 ->設置-> 禁用函數,將pcntl_signal、pcntl_fork等系列刪除即可。
非生產環境,可以將 disable_functions 字段后內容留空。
