PHP APC 上传永远不会标记为完成

发布于 2024-09-28 05:52:15 字数 391 浏览 6 评论 0原文

我有一个运行 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

剩余の解释 2024-10-05 05:52:15

尝试设置 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.

谈情不如逗狗 2024-10-05 05:52:15

检查 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文