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.

General Questions

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

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

Error with inserting image


2 Posts   1363 Views


15 September 2009 at 7:44am Community Member, 332 Posts

[Warning] imagejpeg() [function.imagejpeg]: SAFE MODE Restriction in effect. The script whose uid is 509 is not allowed to access /home/bs2345/domains/ owned by uid 101
GET /cms/admin/assets/EditForm/field/Files/item/7/edit
Line 397 in /home/bs2345/domains/

388             case "gif": $type = 1; break;
389             case "jpeg": case "jpg": case "jpe": $type = 2; break;
390             default: $type = 3; break;
391          }
393          // if the extension does not exist, the file will not be created!
395          switch($type) {
396             case 1: imagegif($this->gd, $filename); break;
397             case 2: imagejpeg($this->gd, $filename, $this->quality); break;
399             // case 3, and everything else
400             default:
401                // Save them as 8-bit images
402                // imagetruecolortopalette($this->gd, false, 256);
403                imagepng($this->gd, $filename); break;
•imagejpeg(Resource id #122,../assets/Uploads/_resampled/AssetLibraryPreview-zaz2.jpg,75)
Line 397 of GD.php
Line 305 of Image.php
Line 264 of Image.php
Line 132 of AssetTableField.php
Line 514 of ComplexTableField.php
Line 769 of ComplexTableField.php

Line 408 of ViewableData.php
Line 20 of
Line 354 of SSViewer.php
Line 773 of ViewableData.php
Line 730 of ComplexTableField.php
Line 129 of RequestHandler.php
Line 143 of RequestHandler.php
Line 143 of RequestHandler.php
Line 143 of RequestHandler.php
Line 122 of Controller.php
Line 277 of Director.php
Line 121 of Director.php
Line 118 of main.php


19 September 2009 at 9:36am Community Member, 1 Post

This works on my machine:
Remove the _resampled folder in assets/uploads.
Recreate the _resampled folder and give 777 permissions.