I have a script that uploads an image and resizes it. It works absolutely fine on my desktop where I test our website. I use Apache. When I try to run this script from our server which has IIS 6.0 it works fine too unless I try to upload picture larger than 1070x1060. For example pictures with these dimensions won't upload: 1071x1061, 1071x1060, 1070x1061. Anything above that won't upload either. I know for sure that it's not a size of a file that matters. I tested 1070x1060 images that were 500KB and 5MB. Both worked. But once I change either dimension by one pixel , it won't work (even if the size of a file is 100KB). Anyone got any idea what the problem can be here?