首页
下载
文档
社区
视频
捐赠
源代码
赞助商
AOT 编译器
AI 助理
商业产品
PHP AOT 原生编译器
Swoole-Compiler 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
freebsd13上swoole的例子无法跑起来,
### 问题描述 在freebsd上执行swoole的例子,程序运行没有任何错误提示,也没有输出start事件的回调。 用openswoole可以跑通swoole的例子。 ### Swoole版本,PHP版本,以及操作系统版本信息 swoole 4.8.11 php7.4和php8.1 操作系统freebsd 13 ### 相关代码 ```php 请将代码粘贴至此处(请勿用截图) $http = new Swoole\Http\Server('127.0.0.1', 9501); $http->on('start', function ($server) { echo "Swoole http server is started at http://127.0.0.1:9501\n"; }); $http->on('request', function ($request, $response) { $response->header('Content-Type', 'text/plain'); $response->end('Hello World'); }); $http->start(); ``` ### 你期待的结果是什么?实际看到的错误信息又是什么? 没有任何错误信息,浏览器访问127.0.0.1:9501 一直在加载,然后就失败了 ,运行后连on->start信息都没有在终端输出。 浏览器 提示 This site can’t be reached127.0.0.1 refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED pf防火墙已经禁用,laravel自带的 SERVER可以跑起来,也是127.0.0.1
发布于4年前 · 13 次浏览 · 来自
提问
raffeale
### 问题描述 在freebsd上执行swoole的例子,程序运行没有任何错误提示,也没有输出start事件的回调。 用openswoole可以跑通swoole的例子。 ### Swoole版本,PHP版本,以及操作系统版本信息 swoole 4.8.11 php7.4和php8.1 操作系统freebsd 13 ### 相关代码 ```php 请将代码粘贴至此处(请勿用截图) $http = new Swoole\Http\Server('127.0.0.1', 9501); $http->on('start', function ($server) { echo "Swoole http server is started at http://127.0.0.1:9501\n"; }); $http->on('request', function ($request, $response) { $response->header('Content-Type', 'text/plain'); $response->end('Hello World'); }); $http->start(); ``` ### 你期待的结果是什么?实际看到的错误信息又是什么? 没有任何错误信息,浏览器访问127.0.0.1:9501 一直在加载,然后就失败了 ,运行后连on->start信息都没有在终端输出。 浏览器 提示 This site can’t be reached127.0.0.1 refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED pf防火墙已经禁用,laravel自带的 SERVER可以跑起来,也是127.0.0.1
赞
0
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
登录
后参与评论
评论
2022-10-25
Rango
感谢你的反馈,`FreeBSD`系统下的兼容性,需要验证
赞
0
回复
2022-11-12
Rango
最新版本已修复,是因为 `freebsd` 不支持 `pthread_barrier` 导致。已兼容
赞
0
回复