文件上传过程中 APC apc_fetch 被阻止
我正在尝试使用 php-apc 模块执行简单的文件上传进度。我正在按照这本书做所有事情,似乎工作正常,但我已经追踪到问题是在上传文件时 apc_fetch()
被阻止。
我已经通过在一个浏览器选项卡中上传 20mb 的内容以及对输出时间戳的 url 的请求对其进行了测试。我可以向时间戳 url 发出多个请求,它们都会完成并返回响应。如果我将其切换到输出 apc 缓存上传值的进度 url,则当该项目尚未缓存并且上传尚未开始时,它将返回 - 它返回 false。一旦上传开始,该缓存键上的 apc_fetch()
似乎就会被阻止,直到上传完成。上传完成后,请求将返回,但带有已完成文件的状态。
我尝试将 apc.rfc1867_freq 设置为不同的值,但阻塞问题仍然出现。
以前有人见过这样的事情吗?我将不得不暂停这方面的工作并寻找替代方案。
干杯!
I'm trying to do the simple file upload progress using the php-apc module. I'm doing everything to the book, seems to work ok, but I've tracked down the problem to apc_fetch()
being blocked whilst the file is being uploaded.
I've tested it with a 20mb upload in one browser tab, and a request to a url that spits out a timestamp. I can make multiple requests to the timestamp url and they all complete and return a response. If I switch it to the progress url which outputs the value of the apc cache upload value, it will return when the item has not been cached and the upload has not started - it returns false. As soon as the upload starts, it seems that apc_fetch()
on that cache key just gets blocked until the upload has finished. As soon as the upload finishes the request will return but with the status of the finished file.
I've tried setting apc.rfc1867_freq
to different values but the blocking problem still occurs.
Has anyone seen anything like this before? I'm going to have to pause work on this and look at alternatives.
Cheers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需使用 PHP 上传扩展即可!
http://www.ultramegatech.com/2010/10/create-an-upload-progress-bar-with-php-and-jquery/" ultramegatech.com/2010/10/create-an-upload-progress-bar-with-php-and-jquery/
Just use the PHP upload extension!
http://www.ultramegatech.com/2010/10/create-an-upload-progress-bar-with-php-and-jquery/