Re: php File upload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom wrote:
Hi,

on a linux system (Suese 10.2) with 1 GB memory its not possible to upload via http a 1 Gb File. Thats no limit problem on my php config. i can look the mem stats when uploading and the growing tmp file. If the temp file has 900 MB, Main Memory free is 0 and the script aborts and php deletes the tmp file.

Why don't php use swap memory ?

Greets Tom



After reading this thread, I would like to add my thoughts.

What Apache starts, it reads the PHP memory limits in to the running Apache process. When you try and upload a file, it is a straight HTTP upload. PHP plays no part in the actual upload, except for the upload limits set in place by the php settings found in the php.ini or other Apache config files. Now, Apache actually handles the Upload. Once the file has been received completely, Apache then passes the file and process running to PHP.

I have never seen a case where Apache has stored the file on the file system. In my past experience it has always held the file in memory, therefor limited to the max physical memory that was install, minus a little for other things.

I have worked on Debian (potato|woody|sarge), Redhat 5.0 -> 9, Fedora 1 -> 7, OpenBSD 3.6->current, and older versions of NetBSD and FreeBSD.

I have also frequented a number of friends installs and I have never seen uploads happen any other way. Nor have I heard of uploads happening any other way.

Just my 2cents :)

--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux