Jump to content

[SOLVED] help me decipher a fatal error


Lodius2000

Recommended Posts

heres what php gave me

 

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4368 bytes) in /editform/index.php on line 224

 

line 224 reads

 

$src_bg  = imagecreatefromjpeg($_FILES['uploadfile']['tmp_name']);

 

and mac os tells me the file is 1.1 megs, 1162147 bytes exactly

also php.ini contains the line

 

upload_max_filesize = 20M      //set high, just in case

 

what does that error mean in english?

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/129669-solved-help-me-decipher-a-fatal-error/
Share on other sites

thorpe, basically what you are saying is the server ran out of ram, or something similar, like on an old mac when you had 32mb of ram and 5 web browser windows open, then you try to open photoshop and the computer tells you it cant do it..... that "out of memory"?

Yup. Thats the one. There is a directive within the php.ini though (memory_limit) which limits php to only be able to use a certain amount of memory. Its actually that limit you have hit.

 

memory_limit helps protect the machine against rogue scripts eating all the memory.

so i read up on it and quickly set it to -1, to remove all the limiting, but i understand what you are saying about rogue scripts, so is there a realistic limit i could set it to so that I can still upload pictures but dont have to worry about nasties?

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.