testingbydev / smart-lencioni-image-resizer

Automatically exported from code.google.com/p/smart-lencioni-image-resizer
GNU General Public License v3.0
0 stars 0 forks source link

Allowed memory size problem #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open a page with lot of slir images
2.
3.

What is the expected output? What do you see instead?
I dont expect memory error

What version of the product are you using? On what operating system?
slir2.0b4

Please provide any additional information below.

I am getting this 
PHP Fatal error:  Allowed memory size of 104857600 bytes exhausted (tried to 
allocate 22460 bytes) in /home/plkulxy/public_html/slir/slirimage.class.php on 
line 440

Original issue reported on code.google.com by utkudal...@gmail.com on 23 Mar 2011 at 6:53

GoogleCodeExporter commented 9 years ago
It sounds like your maximum allowed memory usage is set too low for the size of 
image you are trying to resize. The default maximum memory SLIR will allocate 
is currently 100 megabytes.

To fix this, you need to set $maxMemoryToAllocate in your slirconfig.class.php 
file to something large enough to accommodate the image you are working with. 
For example, to increase the maximum amount of memory SLIR will allocate to 100 
megabytes, add this to your slirconfig.class.php file below where it says 
"override configuration values here":

public static $maxMemoryToAllocate = 150;

Play around with the numbers until you find what works well for you.

Original comment by joe.lencioni on 23 Mar 2011 at 3:09

GoogleCodeExporter commented 9 years ago
I'm getting this error myself now.
I've set $maxMemoryToAllocate = 850, but no change.

I'm listing images in a folder, and several images are not cropped.
Trying to open the url gives me this exception.

The URL can be: 
http://my-stire.com/wp-content/plugins/wp-filebrowser/slir/?w=90&h=90&c=1:1&i=ht
tp://sanabygg.stiengenterprises.no/files/Bak/26052011155.jpg

Why do I get this when the image '26052011155.jpg' is just 85KB?

Original comment by spsti...@hotmail.com on 22 Aug 2011 at 6:57