php start.php start -d 抛exception

q527198615

在服务器上面部署workerman-chat 启动的时候抛异常

6317 6 0
6个回答

q527198615
# php start.php start -d
Workerman start
# PHP Warning:  posix_setsid() has been disabled for security reasons in /home/workerman-chat-master/Workerman/Worker.php on line 547

Warning: posix_setsid() has been disabled for security reasons in /home/workerman-chat-master/Workerman/Worker.php on line 547
PHP Warning:  posix_getuid() has been disabled for security reasons in /home/workerman-chat-master/Workerman/Worker.php on line 342

Warning: posix_getuid() has been disabled for security reasons in /home/workerman-chat-master/Workerman/Worker.php on line 342
PHP Warning:  posix_getpwuid() has been disabled for security reasons in /home/workerman-chat-master/Workerman/Worker.php on line 342

Warning: posix_getpwuid() has been disabled for security reasons in /home/workerman-chat-master/Workerman/Worker.php on line 342
PHP Notice:  Undefined variable: errno in /home/workerman-chat-master/Workerman/Worker.php on line 1001

Notice: Undefined variable: errno in /home/workerman-chat-master/Workerman/Worker.php on line 1001
PHP Notice:  Undefined variable: errmsg in /home/workerman-chat-master/Workerman/Worker.php on line 1001

Notice: Undefined variable: errmsg in /home/workerman-chat-master/Workerman/Worker.php on line 1001
PHP Warning:  stream_socket_server() has been disabled for security reasons in /home/workerman-chat-master/Workerman/Worker.php on line 1001

Warning: stream_socket_server() has been disabled for security reasons in /home/workerman-chat-master/Workerman/Worker.php on line 1001
PHP Notice:  Undefined variable: errmsg in /home/workerman-chat-master/Workerman/Worker.php on line 1004

Notice: Undefined variable: errmsg in /home/workerman-chat-master/Workerman/Worker.php on line 1004
PHP Fatal error:  Uncaught exception 'Exception' in /home/workerman-chat-master/Workerman/Worker.php:1004
Stack trace:
#0 /home/workerman-chat-master/Workerman/Worker.php(336): Workerman\Worker->listen()
#1 /home/workerman-chat-master/Workerman/Worker.php(267): Workerman\Worker::initWorkers()
#2 /home/workerman-chat-master/start.php(17): Workerman\Worker::runAll()
#3 {main}
  thrown in /home/workerman-chat-master/Workerman/Worker.php on line 1004

Fatal error: Uncaught exception 'Exception' in /home/workerman-chat-master/Workerman/Worker.php:1004
Stack trace:
#0 /home/workerman-chat-master/Workerman/Worker.php(336): Workerman\Worker->listen()
#1 /home/workerman-chat-master/Workerman/Worker.php(267): Workerman\Worker::initWorkers()
#2 /home/workerman-chat-master/start.php(17): Workerman\Worker::runAll()
#3 {main}
  thrown in /home/workerman-chat-master/Workerman/Worker.php on line 1004{{{

}}}
  • 暂无评论
walkor 打赏

posix_setsid 被禁用了

1、运行php --ini 命令,看看php.ini文件在哪里
2、在文件中搜索 posix_setsid 关键字,把关键字删掉

  • workercat 2016-06-22

    还有一种情况就是,将 php.ini 里面的 disable_functions 中 stream_socket_server 函数去掉。

gysidon

我怎么在php.ini里面找不到posix_setsid呢??

  • 暂无评论
walkor 打赏

@gysidon 你要看你被禁用的是不是posix_setsid。
另外确认下php.ini位置找对了没。php.ini位置参考上面第一步运行php --ini查找

  • 暂无评论
gysidon

搞定了,多谢!

  • 暂无评论
walkor 打赏

不客气

  • 暂无评论
年代过于久远,无法发表回答
×
🔝