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

相关文章

(1)创建数据表: CREATE TABLE IF NOT EXISTS `think_form` ...
组合查询的主体还是采用数组方式查询,只是加入了一些特殊的...
(1)创建模版:/App/Home/View/Form/edit.html   <FORM m...
自定义配置文件user.php: <?php return array(    \'se...
在一些成熟的CMS系统中,后台一般都包含一个配置中心(如织梦...
废话不多说先上图预览下,即本博客的分页; 这个分页类是在...