Re: Bug #13094 Updated: Upload very slow
| From: | Jani Taskinen | Date: | Sun, 02 Sep 2001 20:42:05 +0000 |
| Subject: | Re: Bug #13094 Updated: Upload very slow | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-64913@lists.php.net to get a copy of this message | ||
That code looks promising. And more efficient than what we have now.
I'm gonna commit some work I started on this part. Main problem
now is that we use the default post reader to read the data.
My patch will fix that problem and is the first step. Next
step will be to make it really to read the data in chunks and
parse it as it comes in.
Stay tuned. :)
--Jani
On 2 Sep 2001 jimw@apache.org wrote:
>there's code to do this (for apache) in libapreq
>(http://httpd.apache.org/apreq/). this is probably something that php
>should fix in the sapi layer. while the libapreq code obviously won't
>work for other servers, it may be a good source of code.
>
>jim
>
>Andi Gutmans <andi@zend.com> wrote:
>> I think the problem is the fact that we read all of the file into Memory
>> (and therefore probably swap). I couldn't see any erealloc()'s in the code
>> so I'd bet on the former problem. Maybe ASP writes out the file while it's
>> arriving.
>> Anyone have any ideas?
>>
>> Andi
>>
>> At 03:17 PM 9/2/2001 +0000, jeroen@php.net wrote:
>>>ID: 13094
>>>Updated by: jeroen
>>>Reported By: mvl@lionsolutions.nl
>>>Status: Open
>>>Bug Type: Performance problem
>>>Operating System: Windows 2000
>>>PHP Version: 4.0.6
>>>New Comment:
>>>
>>>Seems duplicate of 2291, but that one should be fixed in 4.0.6
>>>
>>>Previous Comments:
>>>------------------------------------------------------------------------
>>>
>>>[2001-09-02 07:34:53] mvl@lionsolutions.nl
>>>
>>>?php
>>>if(is_uploaded_file($userfile))
>>> {
>>> $FileNameAdd =
>>> $FileName; //Prefix for
>>> filename using uniqid();
>>> $FileNameAddDB =
>>> $DBFileName; //Including prefix used for database
>>> $filename =
>>> $HTTP_POST_FILES['userfile']['name']; //Filename as selected
>>> by user
>>> $FileExt = substr(strrchr($filename, "."), 1);
>>> if(array_search($FileExt, $Extensions) == FALSE)
>>> {
>>>?>
>>> <font class="warning">Not allowed to upload this
>>> file.</font>
>>><?php
>>> exit();
>>> }
>>> $DBFileSize = $HTTP_POST_FILES['userfile']['size'];
>>> $DBFileName = $FileNameAddDB.$filename;
>>> move_uploaded_file($userfile, $Mapping . $FileNameAdd.$filename);
>>>?>
>>>
>>>Didn't compile anything just use the compiled version as download from
>>>website.
>>>
>>>When I upload a file bigger than 10 MB, it takes a very long time (if it
>>>uploads) I adjusted all the needed variables in php.ini.
>>>I'm using it for files (>150MB) over a Lan network.
>>>I've tried a ASP uploader and it does the same file in less then three
>>>minutes. PHP was working for 30 minutes and still wasn't done.
>>>I think this is a bug in the code.
>>>
>>>Marcel van Leeuwen
>>>Netherlands
>>>
>>>------------------------------------------------------------------------
>>>
>>>
>>>
>>>Edit this bug report at
>>>http://bugs.php.net/?id=13094&edit=1
>>>
>>>
>>>--
>>>PHP Development Mailing List <http://www.php.net/>
>>>To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
>>>For additional commands, e-mail: php-dev-help@lists.php.net
>>>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>>
>
>