PHP APC 上传永远不会标记为完成
我有一个运行 PHP 5.2.6-1 的 LAMP 设置,带有 Suhosin 补丁 (0.9.6.2) 和 Zend (2.2.0),启用了 APC,可与使用 ajax cal 的文件上传脚本一起使用来获取状态并生成进度酒吧。
一切似乎都正常,文件上传完美,并在网站上正确显示,或者如果您下载它,但它从未被 APC 标记为“完整”,文件大小也没有达到实际大小(在 APC 调用中,上传的文件就可以了)。
APC 从未看到文件完全上传的原因可能是什么?我该如何解决这个问题?我目前正在为此运行一种相当 hack'n'slash 的方式,因为文件大小总是达到至少 90%,我有我的 ajax 调用检查大小,如果它是 90% 并保持在那里进行 3 次更新,它再等待 5 秒,然后期望它完成(如果它是一个大文件并且实际上尚未完成,则不理想)
I have a LAMP setup running PHP 5.2.6-1 with the Suhosin Patch (0.9.6.2) and Zend (2.2.0) with APC enabled for use with a file upload script using an ajax cal to get the status and generate a progress bar.
Everything appears to be working, the file uploads perfectly and is displayed correctly on the website or if you download it, but it never gets marked as "complete" by APC, nor does the file size reach the actual size (in the APC call, the uploaded file is just fine).
What could be the reason for APC never seeing the file completely uploaded, and how can I solve this? I'm currently running a rather hack'n'slash way for this, since the file size always reaches at least 90%, I've got my ajax call checking the size, if it's at 90% and stays there for 3 updates, it waits 5 more seconds and then expects it to be completed (not ideal if it's a large file and it really isn't done yet)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试设置 apc.rfc1867_freq=0 这应该使 APC 一直更新大小,而之前它可能以 10k 增量更新并在接近结束时停止。
Try setting apc.rfc1867_freq=0 this should make APC update the size all the way, whereas before it may have been updating it in 10k increments and stopped near the end.
检查 upload_max_filesize。如果您尝试上传大于 upload_max_filesize 的文件,那么您将会遇到此问题。增加 upload_max_filesize 来解决该问题。
check the upload_max_filesize. If you are trying to upload a file that is bigger than upload_max_filesize then the you will have this problem. Increase the upload_max_filesize to fix the problem.