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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

Error with inserting image


Go to End


2 Posts   2419 Views

Avatar
Webdoc

Community Member, 349 Posts

15 September 2009 at 7:44am

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

Source
388 case "gif": $type = 1; break;
389 case "jpeg": case "jpg": case "jpe": $type = 2; break;
390 default: $type = 3; break;
391 }
392
393 // if the extension does not exist, the file will not be created!
394
395 switch($type) {
396 case 1: imagegif($this->gd, $filename); break;
397 case 2: imagejpeg($this->gd, $filename, $this->quality); break;
398
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;
Trace
•imagejpeg(Resource id #122,../assets/Uploads/_resampled/AssetLibraryPreview-zaz2.jpg,75)
Line 397 of GD.php
•GD->writeTo(../assets/Uploads/_resampled/AssetLibraryPreview-zaz2.jpg)
Line 305 of Image.php
•Image->generateFormattedImage(AssetLibraryPreview,,)
Line 264 of Image.php
•Image->getFormattedImage(AssetLibraryPreview)
Line 132 of AssetTableField.php
•AssetTableField->getCustomFieldsFor(Image)
Line 514 of ComplexTableField.php
•ComplexTableField->getFieldsFor(Image)
Line 769 of ComplexTableField.php
•ComplexTableField_ItemRequest->DetailForm()

•call_user_func_array(Array,Array)
Line 408 of ViewableData.php
•ViewableData->XML_val(DetailForm,,1)
Line 20 of .cache.home.bs2345.domains.ristoreisid.ee.public_html.cms.sapphire.templates.ComplexTableField_popup.ss
•include(/home/bs2345/domains/ristoreisid.ee/public_html/cms/silverstripe-cache/.cache.home.bs2345.domains.ristoreisid.ee.public_html.cms.sapphire.templates.ComplexTableField_popup.ss)
Line 354 of SSViewer.php
•SSViewer->process(ComplexTableField_ItemRequest)
Line 773 of ViewableData.php
•ViewableData->renderWith(ComplexTableField_popup)
Line 730 of ComplexTableField.php
•ComplexTableField_ItemRequest->edit(HTTPRequest)
Line 129 of RequestHandler.php
•RequestHandler->handleRequest(HTTPRequest)
Line 143 of RequestHandler.php
•RequestHandler->handleRequest(HTTPRequest)
Line 143 of RequestHandler.php
•RequestHandler->handleRequest(HTTPRequest)
Line 143 of RequestHandler.php
•RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
•Controller->handleRequest(HTTPRequest)
Line 277 of Director.php
•Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
•Director::direct(/admin/assets/EditForm/field/Files/item/7/edit)
Line 118 of main.php

Avatar
krossner

Community Member, 1 Post

19 September 2009 at 9:36am

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