Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Cannot install, issues with mod_rewrite

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

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

Page: 1 2
Go to End
Author Topic: 50891 Views
  • Vodor
    Avatar
    Community Member
    3 Posts

    Cannot install, issues with mod_rewrite Link to this post

    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

  • xeraa
    Avatar
    Google Summer of Code Hacker
    58 Posts

    Re: Cannot install, issues with mod_rewrite Link to this post

    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 ).
    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

  • ckim
    Avatar
    Community Member
    18 Posts

    Re: Cannot install, issues with mod_rewrite Link to this post

    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.

  • Vodor
    Avatar
    Community Member
    3 Posts

    Re: Cannot install, issues with mod_rewrite Link to this post

    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

  • Sigurd
    Avatar
    Forum Moderator
    628 Posts
  • xeraa
    Avatar
    Google Summer of Code Hacker
    58 Posts

    Re: Cannot install, issues with mod_rewrite Link to this post

    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

  • pouderStream
    Avatar
    Community Member
    33 Posts

    Re: Cannot install, issues with mod_rewrite Link to this post

    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?

  • Sigurd
    Avatar
    Forum Moderator
    628 Posts

    Re: Cannot install, issues with mod_rewrite Link to this post

    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

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