File Upload Problem


I am having problem in image uploading, I get memory exhausted errors. Is there anyway that play with memory. If i upload an image of like 2.5MB it works but if i try to upload same image i.e. 5 times in a row then i start get memory errors.

I think this could be solved by memory management, but i have no idea if there is a way of memory management in php.

Here is my code for uploading, I am also doing image resize using GD library

move_uploaded_file($_FILES['imgfile1']['tmp_name'], $uploaddir.'/'.$_FILES['imgfile1']['name']);		


Here are some articles on how to give php more memory

I get memory exhausted errors

Why don’t you read them? You can learn name of the function that caused the problem and then investigate that it belongs to image resize using GD library, not to upload itself, which consumes no memory.