21288 Posts in 5733 Topics by 2602 members
General Questions
SilverStripe Forums » General Questions » Fatal Error: Allowed Memory Size - How to Find/Remove offending image
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 134 Views |
-
Fatal Error: Allowed Memory Size - How to Find/Remove offending image

12 February 2013 at 10:05am
It's happened to me numerous times when clients have uploaded images that are too big for GD on their server to handle.
The result is 'Fatal Error: Allowed Memory Size' errors on the screen, and the CMS page becomes unusable where that image is attached.
This usually means I have to go and search on the server for large images, download, make it smaller, upload agian, and it's all ok, but it's a real pain...
I'm wondering if anyone can help me out, what I'm hoping for is:
1: a quick way of knowing which particular image cuased this error - eg, getting a better error message back from 'sapphire/filesystem/GD.php'
2: some way Silverstripe sees the error, and instead of just failing completely, it allows the user to remove the image, and try again
I'm working here with SS 2.4, but i think it's the same issue in 3
Cheers
-
Re: Fatal Error: Allowed Memory Size - How to Find/Remove offending image

12 February 2013 at 11:00am
Quoting Uncle Cheese:
_config.php
ini_set('memory_limit','256M');
.htaccess
php_value memory_limit 256M
-
Re: Fatal Error: Allowed Memory Size - How to Find/Remove offending image

12 February 2013 at 11:08am
Hi, yup, that's a way of trying to avoid the problem, but i've found clients will still end up trying to upload a 15mb, 6000 pixel wide image and screw things up!
putting an upload limit is another option, but with jpgs its more to do with the pixel size than file size when it comes to resizing it, and some hosting companies don't allow you to up the memory limit (which is the case in the site i'm working on just now)
| 134 Views | ||
|
Page:
1
|
Go to Top |


