thinkphp 5.0报错pcntl_signal() has been disabled for security reasons问题解决

环境
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 字段后内容留空。

 

posted on   zqifa  阅读(9501)  评论(0编辑  收藏  举报

编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 字符编码:从基础到乱码解决

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示