ID:               15681
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         IIS related
 Operating System: Windows 2000 Server
 PHP Version:      4.1.1
 New Comment:

This is already taken care of in CVS and the fix
will be in PHP 4.2 release. (And no, I don't know when
it will be released..)

You could try getting some dev build from www.php4win.de
though.

--Jani



Previous Comments:
------------------------------------------------------------------------

[2002-02-22 15:01:19] [EMAIL PROTECTED]

If I upload a large file to a PHP web page I noticed the upload
consumes 100% of the cpu on the IIS server.  It sounds like there is a
very small buffer being allocated in PHP for the file writing.  Is
there any way to adjust this so that PHP can accept large HTML POSTs
without consuming so much CPU time?

Attached is php code that will allow you to duplicate the problem:

----------------------------------

<HTML>
<TITLE>
File upload
</title>
<body>

<B>File upload</b>

<form enctype="multipart/form-data" action="upload.aspx"
method="post">

<!-- "MAX_FILE_SIZE" determines the biggest size an uploaded
file can occupy -->

<input type="hidden" name="MAX_FILE_SIZE"
value="500000000">
Send this file: 
  <input id="File1" name="File1" type="file"><br><br>
<input type="submit" name="submit" value="Send
File">
</form>

</body>

<?PHP

/*  

$userfile - The temporary filename in which the uploaded file was
stored
on the server machine. 

$userfile_name - The original name or path of the file on the sender's
system. 

$userfile_size - The size of the uploaded file in bytes. 

$userfile_type - The mime type of the file if the browser provided
this
information. An example would be "image/gif". 
  
*/

// copy to this directory

$dir="c:\\Uploads\\";

  
// copy the file to the server

if (isset($submit)){

        copy($userfile,$dir.$userfile_name);    
        
        if (!is_uploaded_file ($userfile)){
        
                echo " <b>$userfile_name</b> couldn't be copied
!!";
        }
}

// check whether it has been uploaded

if (is_uploaded_file ($userfile)){

        echo " <b>$userfile_name</b> copied succesfully
!!";
        
}

?>

</html>

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=15681&edit=1

Reply via email to