Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Custom Site Config Issue with Extended Image Class

Go to End

2 Posts   1467 Views


Community Member, 17 Posts

28 September 2010 at 12:59pm

Hi all,

This is crashing my Apache server when I call a method on the ExtendedImage class from a template... thoughts?

------------ CustomSiteConfig.php -------------

class CustomSiteConfig extends DataObjectDecorator {

function extraStatics() {
return array(
'db' => array(


'has_one' => array(
'BannerImage' => 'ExtendedImage',
'SectionImage' => 'ExtendedImage'

public function updateCMSFields(FieldSet &$fields) {
$fields->addFieldToTab("Root.Main", new ImageField("BannerImage", "Default Banner Image"));
$fields->addFieldToTab("Root.Main", new ImageField("SectionImage", "Default Section Image"));

---------- ExtendedImage.php ------------------------------------

class ExtendedImage extends Image {

function generateSmallBanner($gd) {
return $gd->croppedResize(940,230);


We are having this problem on both local and live servers.



Forum Moderator, 922 Posts

28 September 2010 at 7:55pm

You'll have to provide more detail. When you say "crashing my Apache server", what are the conditions in that it occurs?

Try checking the Apache logs to see if there's anything in there.