Home
Document
Q&A
Video
Donate
Source Code
Code-Galaxy 云原生平台
Business
Swoole Tracker
Swoole Compiler
Login
Register
全部
提问
分享
讨论
建议
公告
开发框架
发表新帖
Swoole v4.7.1 版本发布,Bug 修复版本
[v4.7.1](https://github.com/swoole/swoole-src/releases/tag/v4.7.1) 版本主要是一个 Bug 修复版本,没有向下不兼容改动。 - 兼容了 PHP 8.1 版本 - 为`SWOOLE_HOOK_CURL`支持了`CURLOPT_RESOLVE`选项 支持了形如`HOST:PORT:ADDRESS`、`[+]HOST:PORT:ADDRESS`、`[-]HOST:PORT:ADDRESS`和多地址的格式 ```php use Swoole\Coroutine; use Swoole\Runtime; Runtime::enableCoroutine(SWOOLE_HOOK_CURL); Coroutine\run(function () { $host = 'httpbin.org'; $url = 'https://httpbin.org/get'; $ip = Coroutine::gethostbyname($host); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_RESOLVE, ["{$host}:443:127.0.0.1", "{$host}:443:{$ip}"]); $data = curl_exec($ch); $httpPrimaryIp = curl_getinfo($ch, CURLINFO_PRIMARY_IP); $body = json_decode($data, true); assert($body['headers']['Host'] === 'httpbin.org'); assert($body['url'] === $url); assert($ip === $httpPrimaryIp); }); ``` ## 更新日志 下面是完整的更新日志: ### 增强 - `System::dnsLookup` 支持查询 `/etc/hosts` (#4341) (#4349) (@zmyWL) (@NathanFreeman) - 增加对 mips64 的 boost context 支持 (#4358) (@dixyes) - `SWOOLE_HOOK_CURL` 支持 `CURLOPT_RESOLVE` 选项 (swoole/library#107) (@sy-records) - `SWOOLE_HOOK_CURL` 支持 `CURLOPT_NOPROGRESS` 选项 (swoole/library#117) (@sy-records) - 增加对 riscv64 的 boost context 支持 (#4375) (@dixyes) ### 修复 - 修复 PHP-8.1 在 on shutdown 时产生的内存错误 (#4325) (@twose) - 修复 8.1.0beta1 的不可序列化类 (#4335) (@remicollet) - 修复多个协程递归创建目录失败的问题 (#4337) (@NathanFreeman) - 修复 native curl 在外网发送大文件偶发超时的问题,以及在 CURL WRITEFUNCTION 中使用协程文件 API 出现 crash 的问题 (#4360) (@matyhtf) - 修复 `PDOStatement::bindParam()` 期望参数 1 为字符串的问题 (swoole/library#116) (@sy-records) 
发布于9月前 · 17 次浏览 · 来自
分享
鲁飞
[v4.7.1](https://github.com/swoole/swoole-src/releases/tag/v4.7.1) 版本主要是一个 Bug 修复版本,没有向下不兼容改动。 - 兼容了 PHP 8.1 版本 - 为`SWOOLE_HOOK_CURL`支持了`CURLOPT_RESOLVE`选项 支持了形如`HOST:PORT:ADDRESS`、`[+]HOST:PORT:ADDRESS`、`[-]HOST:PORT:ADDRESS`和多地址的格式 ```php use Swoole\Coroutine; use Swoole\Runtime; Runtime::enableCoroutine(SWOOLE_HOOK_CURL); Coroutine\run(function () { $host = 'httpbin.org'; $url = 'https://httpbin.org/get'; $ip = Coroutine::gethostbyname($host); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_RESOLVE, ["{$host}:443:127.0.0.1", "{$host}:443:{$ip}"]); $data = curl_exec($ch); $httpPrimaryIp = curl_getinfo($ch, CURLINFO_PRIMARY_IP); $body = json_decode($data, true); assert($body['headers']['Host'] === 'httpbin.org'); assert($body['url'] === $url); assert($ip === $httpPrimaryIp); }); ``` ## 更新日志 下面是完整的更新日志: ### 增强 - `System::dnsLookup` 支持查询 `/etc/hosts` (#4341) (#4349) (@zmyWL) (@NathanFreeman) - 增加对 mips64 的 boost context 支持 (#4358) (@dixyes) - `SWOOLE_HOOK_CURL` 支持 `CURLOPT_RESOLVE` 选项 (swoole/library#107) (@sy-records) - `SWOOLE_HOOK_CURL` 支持 `CURLOPT_NOPROGRESS` 选项 (swoole/library#117) (@sy-records) - 增加对 riscv64 的 boost context 支持 (#4375) (@dixyes) ### 修复 - 修复 PHP-8.1 在 on shutdown 时产生的内存错误 (#4325) (@twose) - 修复 8.1.0beta1 的不可序列化类 (#4335) (@remicollet) - 修复多个协程递归创建目录失败的问题 (#4337) (@NathanFreeman) - 修复 native curl 在外网发送大文件偶发超时的问题,以及在 CURL WRITEFUNCTION 中使用协程文件 API 出现 crash 的问题 (#4360) (@matyhtf) - 修复 `PDOStatement::bindParam()` 期望参数 1 为字符串的问题 (swoole/library#116) (@sy-records) 
赞
0
分享
收藏
提问
分享
讨论
建议
公告
开发框架
评论
还没有评论!
微信公众号
热门内容
- Swoole 4.8.10 已发布
- 云原生时代 PHP/Golang 项目如何实现微服务
- 异步风格的写法,如何同时开启http和websocket?
- 使用全局变量,一个worker进程同时执行多个onRequest协程问题
- HTTP服务器出发热更新,看到工作进程的worker_id也变了,但重新请求response的结果不更新
- 清空redis key
- PDO配置长连接在并发请求时候会报一个bug工作进程自动重启
- Swoole 团队云原生新项目 Code-Galaxy 介绍
- swoole 进程繁忙时候\Swoole\Process::kill($pid, SIGTERM)终止运行后出现一大堆僵尸进程
- 给官方建议 [SWOOLE LINUX 独立版本,加上PHP-event的扩展]
作者其它话题
- thinkphp5.1在使用think-swoole的时候报错unsupported option [host]
- WSL 下服务器响应数据过大无法接收
暂无回复的问答
- 关于openssl CURL WARNING swSSL_connect: SSL_connect(fd=69) failed. Error: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small[1|394]
- 请问那个一键协程化的代码是放外面还是set里面
- 多个模型如何进行事务异常回退?
- websocket开启wss报错
- 协程tcp服务器如何使用多进程?recv()方法接收信息,打印出来的pid一直是同一个。没用使用到多进程啊。