swlib / saber

⚔️ Saber, PHP异步协程HTTP客户端 | PHP Coroutine HTTP client - Swoole Humanization Library
https://packagist.org/packages/swlib/saber
Apache License 2.0
976 stars 124 forks source link

获取请求内容乱码 #147

Closed ucdo closed 11 months ago

ucdo commented 2 years ago

…… $url = "https://apis.map.qq.com/ws/geocoder/v1/?location={$lat},{$lng}&key={$key}&get_poi={$get_poi}"; $response = SaberGM::get($url); $response->getBoay()->getContents();乱码

PHP 8.1.2 (cli)

[PHP Modules]

bcmath calendar Core ctype curl date dom exif FFI fileinfo filter ftp gd gettext hash iconv igbinary intl json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO xlswriter xml xmlreader xmlwriter xsl Zend OPcache zip zlib

swoole

Swoole => enabled Author => Swoole Team team@swoole.com Version => 4.8.9 Built => Jun 9 2022 09:54:58 coroutine => enabled with boost asm context epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled openssl => OpenSSL 3.0.2 15 Mar 2022 dtls => enabled http2 => enabled json => enabled mutex_timedlock => enabled pthread_barrier => enabled futex => enabled async_redis => enabled

Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => Off => Off swoole.unixsock_buffer_size => 8388608 => 8388608

zhaockorg commented 2 years ago

无语。

------------------ 原始邮件 ------------------ 发件人: "swlib/saber" @.>; 发送时间: 2022年6月29日(星期三) 上午10:44 @.>; @.***>; 主题: [swlib/saber] 获取请求内容乱码 (Issue #147)

…… $url = "https://apis.map.qq.com/ws/geocoder/v1/?location={$lat},{$lng}&key={$key}&get_poi={$get_poi}"; $response = SaberGM::get($url); $response->getBoay()->getContents();乱码

PHP 8.1.2 (cli)

[PHP Modules]

bcmath calendar Core ctype curl date dom exif FFI fileinfo filter ftp gd gettext hash iconv igbinary intl json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO xlswriter xml xmlreader xmlwriter xsl Zend OPcache zip zlib

swoole

Swoole => enabled Author => Swoole Team @.*** Version => 4.8.9 Built => Jun 9 2022 09:54:58 coroutine => enabled with boost asm context epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled openssl => OpenSSL 3.0.2 15 Mar 2022 dtls => enabled http2 => enabled json => enabled mutex_timedlock => enabled pthread_barrier => enabled futex => enabled async_redis => enabled

Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => Off => Off swoole.unixsock_buffer_size => 8388608 => 8388608

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

ucdo commented 2 years ago

解决了,卸载之后只安装了swoole4.10,然后只开启了openssl扩展,就好了,不知道原因,但是能用。

@.***

@.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2022年06月29日 10:47 | | 收件人 | @.> | | 抄送至 | @.**@.> | | 主题 | Re: [swlib/saber] 获取请求内容乱码 (Issue #147) |

无语。

------------------ 原始邮件 ------------------ 发件人: "swlib/saber" @.>; 发送时间: 2022年6月29日(星期三) 上午10:44 @.>; @.***>; 主题: [swlib/saber] 获取请求内容乱码 (Issue #147)

…… $url = "https://apis.map.qq.com/ws/geocoder/v1/?location={$lat},{$lng}&key={$key}&get_poi={$get_poi}"; $response = SaberGM::get($url); $response->getBoay()->getContents();乱码

PHP 8.1.2 (cli)

[PHP Modules]

bcmath calendar Core ctype curl date dom exif FFI fileinfo filter ftp gd gettext hash iconv igbinary intl json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO xlswriter xml xmlreader xmlwriter xsl Zend OPcache zip zlib

swoole

Swoole => enabled Author => Swoole Team @.*** Version => 4.8.9 Built => Jun 9 2022 09:54:58 coroutine => enabled with boost asm context epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled openssl => OpenSSL 3.0.2 15 Mar 2022 dtls => enabled http2 => enabled json => enabled mutex_timedlock => enabled pthread_barrier => enabled futex => enabled async_redis => enabled

Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => Off => Off swoole.unixsock_buffer_size => 8388608 => 8388608

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

sy-records commented 2 years ago

之前有相似的issue,里面说了原因,和版本没关系,可以搜下看看。