If you specify in you form the maxfile size is 500kb then its 500kb on the other end.
You cant get the 2mb + 500kb it doesnt work that way.
A reason for the errros, could actually be the maxfilesize in the form. Not all the time this gives the most accurate results, and i dont actually suggest using it. You should actually use the $_FILES or $HTTP_FILES_VARS