Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

files corrupted after using php upload!!

Status
Not open for further replies.

gwu

MIS
Dec 18, 2002
239
US
i am trying to build a very simple web page that uploads files to the server. I find that the files that were uploaded to the server are distorted and corrupted. I tried jpg and txt file.(php on apache on linux redhat)
************************
<?
if(!(copy($_FILES['userfile']['tmp_name'], &quot;../upload/&quot; . $_FILES['userfile']['name']))) die(&quot;Cannot upload files.&quot;);
?>
************************
thanks


 
I remember a post like this before, apparently there's a bug in a certain version of php that casuses uploads to be wrecked. Anyone know of this, or am I just babbling?
 
4.2.2-8.rpm which came with RH 7.3
 
I just did a search and someone mentioned php4.0.4 on RedHat7 was buggy and wrecked images. Loads of other results came back of people using variations on this with the same basic stuff and all wrecked images, no-one told them about it though, presumably no-one saw the connection.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top