首页
下载
文档
社区
视频
捐赠
源代码
赞助商
AOT 编译器
AI 助理
商业产品
PHP AOT 原生编译器
Swoole-Compiler 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
同样的代码在4.5.2下正常,4.5.3下面不行
### 问题描述 协程websocket客户端 [x.php.txt] ### Swoole版本,PHP版本,以及操作系统版本信息 What version of Swoole are you using (show your php --ri swoole)? swoole Swoole => enabled Author => Swoole Team team@swoole.com Version => 4.5.3 Built => Aug 30 2020 14:44:16 coroutine => enabled epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled openssl => OpenSSL 1.0.2k-fips 26 Jan 2017 http2 => enabled pcre => enabled zlib => 1.2.7 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 => On => On swoole.unixsock_buffer_size => 8388608 => 8388608 What is your machine environment used (show your uname -a & php -v & gcc -v) ? Linux localhost.localdomain 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux PHP 7.4.9 (cli) (built: Aug 14 2020 18:18:09) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.9, Copyright (c), by Zend Technologies Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ### 相关代码 ```php 请将代码粘贴至此处(请勿用截图) ``` [x.php.txt] ### 你期待的结果是什么?实际看到的错误信息又是什么? What did you expect to see? 希望在4.5.3环境下执行能看到打印出数组 What did you see instead? 在4.5.2下能打印,4.5.3下没有输出 请看代码中 print_r($klines); 这一段
发布于6年前 · 1 次浏览 · 来自
提问
hkargv
### 问题描述 协程websocket客户端 [x.php.txt] ### Swoole版本,PHP版本,以及操作系统版本信息 What version of Swoole are you using (show your php --ri swoole)? swoole Swoole => enabled Author => Swoole Team team@swoole.com Version => 4.5.3 Built => Aug 30 2020 14:44:16 coroutine => enabled epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled openssl => OpenSSL 1.0.2k-fips 26 Jan 2017 http2 => enabled pcre => enabled zlib => 1.2.7 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 => On => On swoole.unixsock_buffer_size => 8388608 => 8388608 What is your machine environment used (show your uname -a & php -v & gcc -v) ? Linux localhost.localdomain 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux PHP 7.4.9 (cli) (built: Aug 14 2020 18:18:09) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.9, Copyright (c), by Zend Technologies Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ### 相关代码 ```php 请将代码粘贴至此处(请勿用截图) ``` [x.php.txt] ### 你期待的结果是什么?实际看到的错误信息又是什么? What did you expect to see? 希望在4.5.3环境下执行能看到打印出数组 What did you see instead? 在4.5.2下能打印,4.5.3下没有输出 请看代码中 print_r($klines); 这一段
赞
0
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
登录
后参与评论
评论
2020-09-02
鲁飞
在你代码里加个sleep就可以了,4.5.3修复了一个WebSocket finish 属性无效的问题,你打印的数据是从两个帧来的
赞
0
回复
2020-09-02
hkargv
确实是从两个帧来的 确定是4.5.3没问题是吧?是的话那我就采用你的这个方法,虽然sleep感觉有点怪
赞
0
回复
2020-09-05
AndyE
代码呢,我怎么看不到代码,兄弟,你怎么修复问题的?
赞
0
回复