wrathican Posted August 9, 2007 Share Posted August 9, 2007 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..? Quote Link to comment https://forums.phpfreaks.com/topic/64113-image-upload-form/ Share on other sites More sharing options...
lemmin Posted August 9, 2007 Share Posted August 9, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/64113-image-upload-form/#findComment-319515 Share on other sites More sharing options...
Orio Posted August 9, 2007 Share Posted August 9, 2007 Tried googling? http://forum.mamboserver.com/showthread.php?t=10152&highlight=Allowed+memory+size+8388608+bytes+exhausted http://www.tech-recipes.com/php_programming_tips777.html Orio. Quote Link to comment https://forums.phpfreaks.com/topic/64113-image-upload-form/#findComment-319523 Share on other sites More sharing options...
wrathican Posted August 9, 2007 Author Share Posted August 9, 2007 so if im using all the memory i can then can i not flush it out so that it is available again? Quote Link to comment https://forums.phpfreaks.com/topic/64113-image-upload-form/#findComment-319532 Share on other sites More sharing options...
wrathican Posted August 9, 2007 Author Share Posted August 9, 2007 bump Quote Link to comment https://forums.phpfreaks.com/topic/64113-image-upload-form/#findComment-319556 Share on other sites More sharing options...
m1a2x3x7 Posted August 9, 2007 Share Posted August 9, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/64113-image-upload-form/#findComment-319609 Share on other sites More sharing options...
Orio Posted August 9, 2007 Share Posted August 9, 2007 Check the second link, it tells you what to do. Also check this link: Memory managment You know, its not so hard to open google and search for what you need. Orio. Quote Link to comment https://forums.phpfreaks.com/topic/64113-image-upload-form/#findComment-319610 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.