Re: Pictureupload
| From: | Georgi Ivanov | Date: | Fri, 04 Nov 2005 11:17:56 +0000 |
| Subject: | Re: Pictureupload | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-225089@lists.php.net to get a copy of this message | ||
On Thursday 03 November 2005 19:12, twistednetadmin wrote:
My advise is not to use $_FILES['img']['type'] or use it with some switch
statement.
Different browsers send different mime types for same image format. For
example on mozila you have image/png on IE you have image/x-png (or vise
versa)
Also the are different mimes for JPEG
image/jpg
image/jpeg
..........
image/gif
image/x-gif
You better see what is the type of the image when the error occurs.
> The errormessage is from this part of the script.
>
> echo "Result:<br>\n";
> echo "Now that didn't seem to work... <br>\n
> Did you try a wrong format or size? <br>\n
> File that failed--> (".$_FILES['guildimage']['name
> '].")<br>";
>
> So it seems that the file is wrong type or size, but as it works with the
> same picture from my own computer that is odd.
>
> The timeout part I have to check before I answer to, but I have 4mb
> connection and the last user it failed for has a 2mb connection. 300kb
> shouldn't make the script time out? Or could it? Where do I check the
> timeout settings btw? PHP.ini?
> Or can I run phpinfo() on it?