allaboutthekick Posted November 8, 2006 Share Posted November 8, 2006 for some reason this script wont validate the image that is trying to be uploaded correctly....I would usually post the script on a link but due to restrictions it wont allow me to post in code box.http://phpfreaks.pastebin.com/819524I recieve this error while trying to upload an image that is too large.....Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 7728 bytes) in /nfs/cust/6/85/82/728586/web/upload.php on line 95 Quote Link to comment Share on other sites More sharing options...
btherl Posted November 8, 2006 Share Posted November 8, 2006 That means you ran out of memory.. and yes it's because the image is too large :)You can either increase the available memory:ini_set('memory_limit', '128M');Or you can use the image size to estimate memory needs, and reject any images which are too large to process. Or maybe you can process the image another way, with command line tools for example. Quote Link to comment Share on other sites More sharing options...
allaboutthekick Posted November 8, 2006 Author Share Posted November 8, 2006 around line 20 i have a image size checker is that incorrect? shouldnt that just do it right there? also after i recieve the error message when trying to upload images that are too big it just leaves 2 files on the server....one is $badd.jpg and the other is o$badd.jpg ($badd being the time and date of the upload as shown on line 30. Quote Link to comment Share on other sites More sharing options...
allaboutthekick Posted November 8, 2006 Author Share Posted November 8, 2006 Ok well i did what you recommended and it worked, except it doesnt stop files that are over 500kb but its ok cause i just realized when i resize it i create a new file that is smaller so it doesnt matter what size they upload.but it would still be nice to have image size checker, so people lets say cant upload images over 4mb Quote Link to comment 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.