Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » .htaccess write permission?

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 6276 Views
  • Gazzieh
    Avatar
    Community Member
    4 Posts

    .htaccess write permission? Link to this post

    Hi, new to this software and struggling to get it working.

    I have Apache 2.2.8 with PHP 5.2.6 and MySQL 5.0 running on a Windows Vista laptop as a site build system.

    I get the .htaccess warning

    Is the .htaccess file writeable?

    Unable to detect whether I can write to files. Please ensure C:\apache\htdocs\silverstripe/.htaccess is writable.

    And if I try to continue with the install I get...

    # Creating C:\apache\htdocs\silverstripe/.htaccess
    ....
    # ERROR: mod_rewrite not working, redirecting to mod_rewrite test page
    # Creating C:\apache\htdocs\silverstripe/.htaccess I will now try and direct you to rewritetest to troubleshoot mod_rewrite

    Now I have changed the Apache httpd.conf to the following...

    <Directory />
    Options All
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>

    <Directory "C:/apache/htdocs">
       Options FollowSymLinks SymLinksifOwnerMatch
       AllowOverride All
       Order allow,deny
       Allow from all
    </Directory>

    <Directory "C:/apache/htdocs/silverstripe">
    Options FollowSymLinks SymLinksifOwnerMatch
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>

    One curious factor is; in the warning and then the error (both given above), the slash becomes a backslash just before the .htaccess call (C:\apache\htdocs\silverstripe/.htaccess). Why? Could this be the error?

    If not, what could it be?

    Beginning to feel that this may not be worth the time unfortunately. :o(

  • Olen
    Avatar
    Community Member
    5 Posts

    Re: .htaccess write permission? Link to this post

    Maybe I am misunderstanding what the problem is, but it seems like you are making this more complicated than it needs to be...like using a jack-hammer to bang in a nail...

    I am new to SilverStripe and all I had to do to prevent that error you are getting was, BEFORE going to the site to begin the installation, just to use my FTP client to make the .htaccess file writable. Then, the installation took about 1 minute with no errors...maybe less than a minute.

  • Gazzieh
    Avatar
    Community Member
    4 Posts

    Re: .htaccess write permission? Link to this post

    The issue is that due to the fact that everything is local I cannot use any FTP Client to connect to the site (since the site is local). I am using Windows and so there is no CHMOD command and the files, by default, are writeable. I have read through and followed the support ticket #2903, which implies this has been sorted; but nothing shakes it.

    Since everything is being run through the Apache server then the rights issue is likely to be managed through this and so hence the changes to httpd.conf! Maybe I should upload it and try it that way but I wanted to integrate SS into the sites I am working at now locally. Equally, I wanted to evaluate SS against another option, Instant Update, that is a purchasable CMS but with no templates and completely integrateable with any site (so the blurb says anyhow).

    Thanks for answering though. :o)

  • runnerman
    Avatar
    Community Member
    24 Posts

    Re: .htaccess write permission? Link to this post

    Have you tried enabling the mod_rewrite extension in Apache? This is important or your installation will fail, and it also needs mod_curl enabled in PHP. The easiest option to get it all running under vista would be to install WAMP (see http://doc.silverstripe.com/doku.php?id=installation-on-windows for instructions, this also explains about mod_rewrite.

  • Gazzieh
    Avatar
    Community Member
    4 Posts

    Re: .htaccess write permission? Link to this post

    Thanks for this.

    I have enabled mod_rewrite; that was the first fault I had and resolved that easily.

    I have enabled mod_curl (I believe anyway; the extension declares it as php_curl).

    The issue with using WAMP is that I have all the components already installed and working. I have been designing sites on this system for a while now without issue. Installing Apache, PHP and MySQL on Vista was not easy and so undoing all this for something I wish to test out seems a bit severe.

  • Gazzieh
    Avatar
    Community Member
    4 Posts

    Re: .htaccess write permission? Link to this post

    Just to say btw, the issue, I believe, si down to the backslash/slash issue.

    The warning message states:

    Unable to detect whether I can write to files. Please ensure C:\apache\htdocs\silverstripe/.htaccess is writable.

    Note that .htaccess is preceeded by a slash and not a backslash. This is also true for the error messages when I run the install anyway.

    This seems to be the primary issue raised by support ticket #2903 as well.

    6276 Views
Page: 1
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.