| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 61263 | 2005-08-30 06:04:00 | PHP - resize pictures on submission | Morgenmuffel (187) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 1357379 | 2005-09-01 10:10:00 | You do have separate tables setup for jpg & gifs in the dB? | bartsdadhomer (80) | ||
| 1357380 | 2005-09-02 00:38:00 | What have you changed? I uploaded a jpg of a hard drive earlier on and it accepted it and just tried again and it won't accept it now I saw that up there Which one did you up load it to? www.nigel.geek.nz or www.nigel.geek.nz And you are sure you uploaded using IE? The upload code is identical between the 2 of them (just the resize code is different), but i have never managed to upload jpgs on either of them using IE 6 (I can upload jpgs in opera and firefox) |
Morgenmuffel (187) | ||
| 1357381 | 2005-09-02 00:55:00 | 200.jpg the picture of the hard drive, I just tried looking at it and i get the message "the file 200.jpg is a gif with incorrect extension, rename?" click yes and I can view it I wonder if that could be why it went up without problems |
Morgenmuffel (187) | ||
| 1357382 | 2005-09-02 01:21:00 | www.nigel.geek.nz and it won't accept gifs now either @ 2.45KB I was using IE 7.0.5 |
bartsdadhomer (80) | ||
| 1357383 | 2005-09-02 01:23:00 | I have a feeling the problem is being caused by some %^&*$#%^ in redmond Virginia The file type mime thingie returns image/pjpeg in IE and image/jpeg in Firefox & Opera so i'm thinking a kludge should solve this problem if (//begin condition (($_FILES['file']['type'] == 'image/gif') && ($_FILES['file']['size'] < 15000)) || (($_FILES['file']['type'] == 'image/jpeg') && ($_FILES['file']['size'] < 15000)) ) (($_FILES['file']['type'] == 'image/pjpeg') && ($_FILES['file']['size'] < 15000)) )//end condition Well I'll test it in a sec |
Morgenmuffel (187) | ||
| 1357384 | 2005-09-02 01:27:00 | Just tried it with Opera 8.1 and it works fine You're right it must be an IE problem Will check it out Funny though cause I use IE to upload to 1/2 dozen sites with the code I posted earlier and never had a problem |
bartsdadhomer (80) | ||
| 1357385 | 2005-09-02 01:37:00 | . nigel . geek . nz/test . php" target="_blank">www . nigel . geek . nz and it won't accept gifs now either @ 2 . 45KB I was using IE 7 . 0 . 5 Is this IE? I've just tested it with various sizes of jpgs and gifs and it seems to pass ok Now I better do the same tests in firefox, (probably botched it completely fixing IE) :D |
Morgenmuffel (187) | ||
| 1357386 | 2005-09-02 01:42:00 | Is this IE? I've just tested it with various sizes of jpgs and gifs and it seems to pass ok Now I better do the same tests in firefox, (probably botched it completely fixing IE) :D Yep IE 7 Works fine now in Opera 8.1 and IE 7 |
bartsdadhomer (80) | ||
| 1357387 | 2005-09-02 01:45:00 | oops might have spoken too soon jpeg uploads ok in Opera but now when hitting the submit button to view the iploaded images I get this image path /home/nigelge/public_html/uploads/cd1.jpg query string cd1.jpg the extension is jpg Warning: Cannot modify header information - headers already sent by (output started at /home/nigelge/public_html/resize.php:8) in /home/nigelge/public_html/resize.php on line 77 ÿØÿà |
bartsdadhomer (80) | ||
| 1357388 | 2005-09-02 01:45:00 | You shouldn't run into a problem as you are using the file extension, whereas i am using the file "mime type thing", (not 100% sure of it, but IE loopy use of image/pjpeg is what was causing my upload problem) I avoided using file extensions as i have seen too many extension variants that people who should know beter add to their file, .jpg .jpeg .JPEG .Jpeg but after all the hassle I'm wondering if it was the correct idea (well now i know the problem it's dead easy) so much for taking the quicker easier route The working version is here (www.nigel.geek.nz) Thanks for the help |
Morgenmuffel (187) | ||
| 1 2 3 4 | |||||