About apache2.x+php5.2x Large file upload memory footprint

Source: Internet
Author: User
Ask a question, there is information on the Internet that PHP upload large files, files will always be cached in memory, not like ASP. NET will have a threshold, more than that will be written on the disk.

But when I actually do it, I use swfupload or traditional uploads, and I don't see any noticeable rise in the machine's memory.
Did php5 make this improvement? Or what is the reason?
Sincere advice


Reply to discussion (solution)

I'm dizzy, what's going on here,

Move_uploaded_file ($file [' Tmp_name '], $new _file)
Name the temporary file that is uploaded to the server under the specified directory.

That's what happened after the temp file was created ...
When this temporary file is generated, it is put in memory first, then write once, or fragment write, I do not know.

To put it bluntly, is to upload 1g of files, will occupy 1g of memory?

From what I have tested here, it will not take up so much, but before the article on the internet said it will, so in order to ensure the accuracy of this information, or to ask

You can upload large files, through the task manager, to see the memory changes (such as import files).

Frankly, I haven't found a satisfactory answer, the solution you provided, and I've tried it when I'm posting.
But my personal resources are limited, and there is no way to reach any of the platforms of any version of the test.
This kind of test is not rigorous.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.