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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

image upload (blurred from one PC/good from the other)

Status
Not open for further replies.

lambi2001

Programmer
Feb 2, 2005
18
DE
Hello, I have a problem with an image upload script.

I am using php to upload an jpg image to a web server. On the server the image is not touched by any kind of manipulating script.
I use move_uploaded_file() and copy() to change the name of the image.

Now when I upload an image from my PC everything is fine.

When somebody uploads the image from a different PC the image is getting blurred.

We are both using windows.

The changes in the images are considerably and I dont know why this happens.

Any help is highly appreciated
 
Know what you mean !!
Ok, we know that the image is ok on the bad PC, which implies that is does not have a virus in it. We can check this by looking at the file size.
.
What we need to establish is it getting screwed in transit. Uploading files is never easy. As you will know you get an array with the name of the file, a tmp name (whic is the realname on the server when it lands) and a mime type.
The diagnostics I asked for are to establish that we are getting the file onto the server and also to see if we have the correct name, for example the tempname might be /tmp/gjgjff which is going to fail the .jpg test as it has no extention. Your code seems to be using the /tmp file to move the file (which is correct) but you use $realname to test against. I'm not too sure where these come from. Is the code to big to post in full ?
.
Anyhow if you off to bed pleasent dreams !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top