ID:               16161
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: Windows 2000
 PHP Version:      4.1.2
 New Comment:

The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php




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

[2002-03-19 00:45:55] [EMAIL PROTECTED]

I have PHP 4.1.2 (binary distribution from www.php.net) and
Apache/1.3.22 Server running under Windows NT 5.0 build 2195 (Windows
2000). I have a problem:
uploaded files seem to be corrupted, namely, all bytes with values
'0x0' in original file are changed to values '0x20' in uploaded one, so
only binary files are corrupted, text files are OK.

Form used:

<form method="POST" action="./upload.php"
enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="65536">
<input name="uploadfile" type="file" size="40">
<br><br>
<input type="submit" value="Send">

The script is:

$tmpname=preg_replace("/\\\/", "/",
$_REQUEST["uploadfile"]["tmp_name"]);
preg_match("/\..*/", $_REQUEST["uploadfile"]["name"], $match);
copy($tmpname, $tmpname . $match[0]);

Thanks for any help.


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


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

Reply via email to