I use: Apache 2.0.36 and PHP 4.2.1 on WinXP

I have major problems when trying to upload files with the following code:

HTML code:

<form name="theForm" method="post" action="../Doc_List/"
<input type="file" name="data" size="25">
<input type="submit" name="Action" value="<? echo(__("Add")); ?>">

Going to the PHP handler:

      if (is_uploaded_file($data))
         $realname = $_FILES['data']['name'];

        echo "data: $data

The program prints: data: C:\WINDOWS\TEMP\php19C.tmp run:1
Everything goes fine if it is just a small text file. And everything seems
to also go fine for larger binary files (e.g. a word document), the document
gets copied to the temp directory. The problem is just that the file gets
completely scrambled on the way. The file almost doubles in size and the
binary data is not the same at all. seems like there is put some kind of
formatting in on the way. (Looks like it gets alot of \0 instead of NULL
bytes everywhere like some others on this group and on php.net has
experienced, but i just can't get it solved...)

I have these set in the php.ini file

magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off

Please Help... :)

/Mathias Bertelsen

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

Reply via email to