webman本地开发的程序放到服务器就没法启动了

yyy798326

问题描述

在本地开发好的程序,然后部署到服务器上就启动不了了
运行start后 又退出了 然后就报以下错误了

报错信息

Press Ctrl+C to stop. Start success.
pcntl_fork() has been disabled for security reasons in file /www/wwwroot/678qphd.com/vendor/workerman/workerman/Worker.php on line 1551
PHP Fatal error:  Uncaught Exception: forkOneWorker fail in /www/wwwroot/678qphd.com/vendor/workerman/workerman/Worker.php:1586
Stack trace:
#0 /www/wwwroot/678qphd.com/vendor/workerman/workerman/Worker.php(1420): Workerman\Worker::forkOneWorkerForLinux()
#1 /www/wwwroot/678qphd.com/vendor/workerman/workerman/Worker.php(1394): Workerman\Worker::forkWorkersForLinux()
#2 /www/wwwroot/678qphd.com/vendor/workerman/workerman/Worker.php(560): Workerman\Worker::forkWorkers()
#3 /www/wwwroot/678qphd.com/start.php(117): Workerman\Worker::runAll()
#4 {main}
  thrown in /www/wwwroot/678qphd.com/vendor/workerman/workerman/Worker.php on line 1586

Fatal error: Uncaught Exception: forkOneWorker fail in /www/wwwroot/678qphd.com/vendor/workerman/workerman/Worker.php:1586
Stack trace:
#0 /www/wwwroot/678qphd.com/vendor/workerman/workerman/Worker.php(1420): Workerman\Worker::forkOneWorkerForLinux()
#1 /www/wwwroot/678qphd.com/vendor/workerman/workerman/Worker.php(1394): Workerman\Worker::forkWorkersForLinux()
#2 /www/wwwroot/678qphd.com/vendor/workerman/workerman/Worker.php(560): Workerman\Worker::forkWorkers()
#3 /www/wwwroot/678qphd.com/start.php(117): Workerman\Worker::runAll()
#4 {main}
  thrown in /www/wwwroot/678qphd.com/vendor/workerman/workerman/Worker.php on line 1586

截图报错信息里报错文件相关代码

1103 1 0
1个回答

nitron

提示很明显了啊,pcntl_fork()被禁用了,去修改php.ini吧
再插一嘴:"baidu虽然不靠谱,但是这个直接baidu能出一大堆结果"

  • yyy798326 2022-10-22

    哦哦 谢谢大神 宝塔默认把很多函数都禁用了,删除了就可以了 谢谢

年代过于久远,无法发表回答
×
🔝