imi icon indicating copy to clipboard operation
imi copied to clipboard

文件上传.并发时 request会提示未初始化

Open KuangKeZero opened this issue 3 years ago • 0 comments

  • 你遇到了什么问题、建议: 文件上传.并发时 request会提示未初始化 如下图 image

  • 请执行下面的命令获取环境信息。

php -v & php --ri swoole & composer info | grep -a imi

[1] 39152
[2] 39153
PHP 8.1.17 (cli) (built: Apr 12 2023 10:06:08) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.17, Copyright (c) Zend Technologies
    with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans
    with Zend OPcache v8.1.17, Copyright (c), by Zend Technologies

swoole

Swoole => enabled
Author => Swoole Team <[email protected]>
Version => 5.0.2
Built => Apr 17 2023 15:31:50
coroutine => enabled with boost asm context
epoll => enabled
eventfd => enabled
signalfd => enabled
cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
openssl => OpenSSL 3.0.8 7 Feb 2023
dtls => enabled
http2 => enabled
json => enabled
pcre => enabled
zlib => 1.2.13
brotli => E16777225/D16777225
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


  • 如果可以,提供最小可复现代码:
/**
 * 请求
 * @Inject(Request::class)
 */
public \Imi\Server\Http\Message\Contract\IHttpRequest $request;

// 报错处
$files = $request->getUploadedFiles();

<font color="red">经过测试 只有上传会报错. 普通请求是正常的. 并发 5</font>

KuangKeZero avatar May 07 '23 08:05 KuangKeZero