PDA

View Full Version : Fatal error: Allowed memory size of 8388608 ???


fragop363190
05-24-2009, 05:50 AM
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4800 bytes) in /.................../WA_DigitalFilePro/HelperPHP.php on line 863


I tried to upload a 2.7MB file... why it needs more than 8MB allocated memory to upload it???

biz295654
05-25-2009, 08:37 AM
When this happened to me, the solution was to make edits to a php.ini file on the server to allow for files larger than 2MB to upload. The php.ini file was located in my .etc folder on the server, but that of course, may be different for you. HTH

AlaskaTom
05-25-2009, 11:46 AM
That error is not generally due to having a 2meg upload limit in php, but having not enough memory allocated to php.

Its not the size of the file that is the issue, its the amount of memory that php needs mess with the file after its upload (ie resize it, or create thumbnails etc).

In you php.ini file, look for the line
memory_limit = 8M

and change it to
memory_limit = 64M

You can set it to less that 64 megs if you want. I personally use 128 megs in php5.

This limit is only the maximum amount of memory that a php process can consume, and is designed to prevent a single php process from using up too much memory.

Hope that helps.

Tom

fragop363190
05-26-2009, 04:56 AM
Ok its a PHP5 issue. the 128MB limit fixed it for the moment being.

Thanks guys.