Jump to content

image upload form


wrathican

Recommended Posts

i get this error when i try and upload an image. i have used it twice before i got this error

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 2576 bytes) in F:\wamp\www\portfolio\pic.php on line 13

does that mean i need to clear the cache or something..?

Link to comment
https://forums.phpfreaks.com/topic/64113-image-upload-form/
Share on other sites

I think your form is only allowing a certain size image. Try uploading a very small image and it should work. Assuming you are using this method of uploading, try adding this input:

<input type="hidden" name="MAX_FILE_SIZE" value="100000">

Change 100000 to whatever you want the max size to be.

Link to comment
https://forums.phpfreaks.com/topic/64113-image-upload-form/#findComment-319515
Share on other sites

you server is only allowing you to add an image at a certain size you don't have to "flush it out" you need to do what lemmin said. next to your upload file input box add  <input type="hidden" name="MAX_FILE_SIZE" value="100000"> the value (10000) is what sets the amount of bytes you can upload to the server. If the value is set at 100000 then you can only upload an image at no greater then that size. It's kind of like a safety feature so they don't max out your server space or add a virus.

Link to comment
https://forums.phpfreaks.com/topic/64113-image-upload-form/#findComment-319609
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.