workman macOS  中出现以下错误,请问怎么解决

just0621

应安装的文件已经安装,线上测试成功,但运行时出现以下错误

Fatal error: Uncaught exception 'Exception' with message 'can not save pid to /Users/qgkjtech/PhpstormProjects/workemantext/Workerman-master/Desktop/_Users_qgkjtech_PhpstormProjects_workemantext_http_test.php.pid' in /Users/qgkjtech/PhpstormProjects/workemantext/Workerman-master/Worker.php:907
Stack trace:
#0 /Users/qgkjtech/PhpstormProjects/workemantext/Workerman-master/Worker.php(429): Workerman\Worker::saveMasterPid()
#1 /Users/qgkjtech/PhpstormProjects/workemantext/http_test.php(19): Workerman\Worker::runAll()
4484 1 0
1个回答

walkor 打赏

/Users/qgkjtech/PhpstormProjects/workemantext/Workerman-master/Desktop/
这个目录不存在或者workerman没有写权限。

workerman要在这个目录写一个pid文件记录workemran主进程pid

你可以通过Worker::pidFile来更改pid路径,参考手册 http://doc.workerman.net/315139

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