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.

Archive /

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

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

Cannot install, issues with mod_rewrite


Go to End
Reply


13 Posts   51065 Views

Avatar
Vodor

Community Member, 3 Posts

29 March 2007 at 11:55pm

Hi Guys.

Really happy that a new beta is out, as the previous one would not work for me.

This installation is working a lot better for me, but I'm stuck on the error....

mod_rewrite doesn't appear to be working. Make sure:

* mod_rewite is enabled in your httpd.conf
* AllowOverride is enabled for the current path.

Please check these options, then refresh this page.

-as far as i can see mod_rewrite is enabled, but I am unsure about the AllowOverride for current path.

Any help would be greatly appreciated!

Regards
ian

Avatar
xeraa

Google Summer of Code Hacker, 58 Posts

30 March 2007 at 3:26am

Edited: 30/03/2007 3:40am

Hi,

I'm quite new to SilverStripe, but I've had a similar problem and will try my best ;).

1) You need to activate mod_rewrite in Apache's httpd.conf, both the module (but you have done that, otherwise the installer would complain on the first page) and AllowOverride. For your document root set AllowOverride to All. On my Windows pc it looks like this (c:/webserver is the document root) - not sure if this is great for security, but it's only a test machine:

<Directory "C:/Webserver">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>

2) Now you could test if mod_rewrite is generally working, just to make sure. Or skip this step if you are sure everything is fine.
I used the example of Bob and Alice from http://www.workingwith.me.uk/articles/scripting/mod_rewrite for testing (just copy and paste alice.html, bob.html and the .htaccess).

3) On my pc mod_rewrite was ok (step 2 was working), but I still got this error.
So I changed line 11 in "rewritetest.php" (directly in the Silverstripe directory) to this:
//@$testrewriting = file_get_contents('http://' . $_SERVER['SERVER_ADDR'] . $baseURL . '/' . 'InstallerTest/testRewrite');
@$testrewriting = file_get_contents('http://' . $_SERVER[HTTP_HOST] . $baseURL . '/' . 'InstallerTest/testRewrite');

I think the problem was that my apache is bound to port 8080 and server_addr disregards the port (but I might be wrong :D).
Anyway, this worked out for me. Hope it can help you as well.

Best regards,
Philipp

PS: Tested on Win XP, Apache 2.2.4, PHP 5.2.1, MySQL 5.0.27

Avatar
ckim

Community Member, 18 Posts

30 March 2007 at 4:01am

Or

get through that point, only thing you need is to ;

cat > .htaccess

# Standard SilverStripe HTACCESS file

RewriteEngine On

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

This will be fixed eventually. Meanwhile, you need a valid .htaccess. This assumes you have already set up virtual name-based hosting.

Avatar
Vodor

Community Member, 3 Posts

30 March 2007 at 8:19am

Superb!

It was the Options All that did it, I only had it as FollowSymLinks.
As this is done on my root dir of /, is this going to cause any security errors?

Thanks all,

Ian

Avatar
Sigurd

Forum Moderator, 628 Posts

30 March 2007 at 8:55pm

See also:

http://www.silverstripe.com/general-discussion/flat/635?showPost=692

Avatar
xeraa

Google Summer of Code Hacker, 58 Posts

31 March 2007 at 12:15am

Vodor, concerning the security: I think I have not phrased that well. I didn't want to imply it's insecure - it just didn't know and care too much, as it's no public server.
But as far as I know it should be fine :).

You could also check it with http://httpd.apache.org/docs/2.2/en/mod/core.html to be sure :P

Avatar
pouderStream

Community Member, 33 Posts

7 April 2007 at 5:30am

Edited: 07/04/2007 5:33am

In rc5 neither is working for me:
-- changing the SERVER_ADDR in testing allow_override nor
-- Options All in <Directory> nor
-- thing with .htaccess

Any suggestions?

Avatar
Sigurd

Forum Moderator, 628 Posts

12 April 2007 at 9:11pm

pouderstream, so you're basically implying that while you had 2.0.0 (i assume) working, you tried to upgrade to rc5 and its not even the installer, but the whole package that didn't work?

note that the best way to upgrade is simply to overwrite sapphire, cms, jsparty folders, you don't need to "install" it via the install.php file...

See http://doc.silverstripe.com/doku.php?id=upgrading

Go to Top