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.

Archive /

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

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

.htaccess write permission?


Go to End


6 Posts   8451 Views

Avatar
Gazzieh

Community Member, 4 Posts

8 November 2008 at 12:16pm

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(

Avatar
Olen

Community Member, 5 Posts

8 November 2008 at 1:20pm

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.

Avatar
Gazzieh

Community Member, 4 Posts

8 November 2008 at 11:26pm

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)

Avatar
runnerman

Community Member, 24 Posts

9 November 2008 at 1:22am

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.

Avatar
Gazzieh

Community Member, 4 Posts

9 November 2008 at 1:39am

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.

Avatar
Gazzieh

Community Member, 4 Posts

9 November 2008 at 1:45am

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.