workerman启动报错 Call to undefined function pcntl_signal()

执行 

php think worker:server

先检查pcntl扩展是否安装,看看php.ini  disabled_function是否启用

php -m | grep pcntl 

确定安装后还报错就运行这两句

curl -Ss https://www.workerman.net/check | php
curl -Ss https://www.workerman.net/fix | php

  • 10
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
回答: 根据引用\[1\]的信息,"Uncaught Error: Call to undefined function pcntl_fork()"是因为没有安装pcntl扩展包。解决这个问题有两种方式。一种是在编译php时加上--enable-pcntl选项,另一种是进入php源码的安装目录,运行phpize命令。根据引用\[2\],编译完成后会生成pcntl.so文件,可以将该文件复制到php的扩展目录中。根据引用\[3\],php默认的扩展程序目录是/usr/lib/php5/20060613+lfs,所以不需要在php.ini文件中额外定义扩展目录。所以,解决这个问题的方法是安装pcntl扩展包并将生成的pcntl.so文件复制到php的扩展目录中。 #### 引用[.reference_title] - *1* [PHP Fatal error: Uncaught Error: Call to undefined function pcntl_fork().. 开启php pcntl扩展实现多...](https://blog.csdn.net/weixin_30947043/article/details/99406900)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [PHP开发炸鸡1(Call to undefined function pcntl_fork())](https://blog.csdn.net/maitiantuzi/article/details/78948272)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [php ”Call to undefined function pcntl_fork”误解决办法](https://blog.csdn.net/weixin_39843078/article/details/115657679)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值