Jump to:

23493 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Files & images problem

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

Page: 1 2 3
Go to End
Author Topic: 2563 Views
  • Webdoc
    Avatar
    Community Member
    332 Posts

    Files & images problem Link to this post

    Running site on SS 2.4 Alpha 1
    But cant upload images to upload folder.

    In assets folder there is no .htaccess file like it was in 2.3.4

  • Webdoc
    Avatar
    Community Member
    332 Posts

    Re: Files & images problem Link to this post

    Can someone help how to fix the assets folder

  • OwenW
    Avatar
    Community Member
    45 Posts

    Re: Files & images problem Link to this post

    Whats the error that you are getting?

    the .htaccess file in assets just contains the extensions that are not able to be executed from there.

    Most likely you have a permissions problem on the assets path.

    Cheers

  • Webdoc
    Avatar
    Community Member
    332 Posts

    Re: Files & images problem Link to this post

    What is the permissoins need to be and also the .htaccess content because @ moment i dont have any .htaccess in assets folder only the main .htaccess

  • Webdoc
    Avatar
    Community Member
    332 Posts

    Re: Files & images problem Link to this post

    CAn someone help me please

  • OwenW
    Avatar
    Community Member
    45 Posts

    Re: Files & images problem Link to this post

    HI Webdoc,

    On my system the .htaccess in the assets folder contains the following;

    RemoveHandler .php .phtml .php3 .php4 .php5 .inc
    RemoveType .php .phtml .php3 .php4 .php5 .inc

    As for the permissions that the assets folder should have, it needs to be readable and writable by the webserver user.

    What error is the webserver throwing when you attempt to upload a file?

    Cheers
    Owen

  • Webdoc
    Avatar
    Community Member
    332 Posts

    Re: Files & images problem Link to this post

    Website Error
    There has been an error
    The website server has not been able to respond to your request.

    root folders htacess is

    ### SILVERSTRIPE START ###

    <IfModule mod_dir.c>
    DirectorySlash Off
    </IfModule>

    <Files *.ss>
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    </Files>

    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)

    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]

    ### SILVERSTRIPE END ###

    also writed th assets folder as you sayd but error is the same

  • OwenW
    Avatar
    Community Member
    45 Posts

    Re: Files & images problem Link to this post

    Do you have access to the webservers error logs? If so, have a look at the error log and see what the webserver thinks the problem is. Chances are it will be a permission denied error.

    Also make sure that the assets folder is owned by the webserver user and they are able to read,write and execute on the folder.

    Cheers

    2563 Views
Page: 1 2 3
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.