Bug #13094: Upload very slow
| From: | mvl at lionsolutions dot nl | Date: | Sun, 02 Sep 2001 11:34:54 +0000 |
| Subject: | Bug #13094: Upload very slow | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-64898@lists.php.net to get a copy of this message | ||
From: mvl@lionsolutions.nl
Operating system: Windows 2000
PHP version: 4.0.6
PHP Bug Type: Performance problem
Bug description: Upload very slow
?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 bug report at: http://bugs.php.net/?id=13094&edit=1