I have been working with this problem for a while now without any success. I am running Redhat 8.0 and have upgraded to php4.3.0 and apache2.0.40 (from what I read, I thought my problem would be solved by this but not the case)
My problem:
When I do a client upload of a file such as a .jpg image, the file seems to get padded when it is stored on the server. For example, I have a .jpg that is 11k on the client side but ends up being 19k on the server. (client is Windows XP and server is Redhat Linux) The image displays but image quality is signifcantly degraded. (definitely corrupted)
This same code was working fine when running php3 code levels, but has broken since moving to the php4.x series. Below is my example code snipet. Any help is GREATLY appreciated.
<HTML>
<BODY>
<?
if ($photo != "")
{
copy($photo, "/tmp/photo.jpg");
}
?>
<form method=POST enctype='multipart/form-data' action='/upload.php'>
Add another photo to a Boat photo ad...<hr>
<input type=hidden name='MAX_FILE_SIZE' value=200000>
Photo: <input type='file' name='photo'>
<input type='hidden' name='MAX_FILE_SIZE' value='16134'>
<br><br><input type='submit' value='Upload ...'>
</form>
</body>
</html>