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

CMS can't access images


Go to End


6 Posts   1434 Views

Avatar
Tetragrammaton

Community Member, 10 Posts

15 November 2011 at 9:46pm

I've got a bunch of images in my assets folder, but when I insert one in my html, the image doesn't load and I get a 500 error. I'm using dataobjectmanager and uploadify. I've set all the folder permissions to 777. What the heck is wrong?

Any help would be appreciated.

Avatar
danzzz

Community Member, 175 Posts

15 November 2011 at 10:08pm

How do you try to insert the images in the theme?

Do you activated Dev Mode for more informative errormessages?

Director::set_environment_type("dev"); // _config.php

Avatar
Tetragrammaton

Community Member, 10 Posts

15 November 2011 at 10:54pm

Yep. I have dev mode on as well as verbose error messages. Silverstripe itself isn't throwing an error, the server just can't access the image files, thus the http 500 error. And it isn't images that I'm trying to insert into my theme. Those are all working fine, most likely because they are stored in the images folder within the theme folder.

The trouble I'm having is images stored within the assets folder which are supposed to be available to my client via the cms to insert into the content boxes via the tinyMCE editor.

If you take a look at the image I've attached, you'll see what I'm talking about. If I take a look at the page resources, it shows that each of those images is throwing an http error 500, i.e. they cannot be accessed. I've tried resyncing the image cache with dev/tasks, but that didn't help. I have no idea what else to do.

Attached Files
Avatar
danzzz

Community Member, 175 Posts

16 November 2011 at 10:26am

you say all images and even the /assets folder has the correct rights?
do you have ssh access? if so try this:

chmod 777 /assets -Rf

I had a similar problem and thougt I set all the rights correct with filezilla, but that dont worked ...

I also had problems like this when I use a http basic auth to secure the site with a pwd ...

Avatar
lerni

Community Member, 81 Posts

16 November 2011 at 12:04pm

heho

on some hosts i've seen smtg like this. the .htaccess in the assets-folder caused the problem. can you remove it just to be sure it's not the cause in your case?

lukas

Avatar
Tetragrammaton

Community Member, 10 Posts

16 November 2011 at 4:48pm

Weird. Deleting the .htaccess file fixed it. I'll have to take a look at the file to see why it was causing the issue. Thanks for the suggestion.