Jump to:

4873 Posts in 7127 Topics by 1471 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » You need mod_rewrite to use friendly URLs with SilverStripe, but it is not enabled.

Getting SilverStripe up and running on your computer and on your web server.

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

Page: 1
Go to End
Author Topic: 2030 Views
  • gerrymax
    Avatar
    Community Member
    1 Post

    You need mod_rewrite to use friendly URLs with SilverStripe, but it is not enabled. Link to this post

    Hello,

    Trying to install latest version. Software looks awsome by the way.

    I'm having issues right after the install, I get the following error:

    [User Error] Couldn't run query: ALTER TABLE "Page" RENAME "_obsolete_Page" Table 'concep22_voyagesalm.Page' doesn't exist
    POST /Projets/ALM2/install.php

    I'm hosted at JustHost. I have contacted them andthey told me this : mod_rewrite is enabled by default on all our servers, it looks like there is some problem with script you are trying to install, please make sure that you have uploaded all needed files and contact it's developers.

    I'have looked somewhere in the forum and tried to add this in my .htaccess :
    ### SILVERSTRIPE START ###
    <Files *.ss>
       Order deny,allow
       Deny from all
       Allow from 127.0.0.1
    </Files>

    <Files web.config>
       Order deny,allow
       Deny from all
    </Files>

    ErrorDocument 404 /assets/error-404.html
    ErrorDocument 500 /assets/error-500.html

    <IfModule mod_alias.c>
       RedirectMatch 403 /silverstripe-cache(/|$)
    </IfModule>

    <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /Projets/ALM2

       RewriteCond %{REQUEST_URI} ^(.*)$
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L,R]
    </IfModule>
    ### SILVERSTRIPE END ###

    (the R)

    Still not working.

    When I go back to the install page, it gives me this still :

    Line 526 in /home/concep22/public_html/Projets/ALM2/sapphire/core/model/MySQLDatabase.php

    Source
    517    }
    518    
    519    function databaseError($msg, $errorLevel = E_USER_ERROR) {
    520       // try to extract and format query
    521       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
    522          $formatter = new SQLFormatter();
    523          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
    524       }
    525       
    526       user_error($msg, $errorLevel);
    527    }
    528    
    529    /**
    530     * Return a boolean type-formatted string
    531     *
    532     * @param array $values Contains a tokenised list of info about this data type

    Can someone please help me ?

    thanks a lot,

    Geraldine

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: You need mod_rewrite to use friendly URLs with SilverStripe, but it is not enabled. Link to this post

    Hi there,

    After the installation has failed, have you tried browsing to the site anyway?
    You could also try this: http://mysite.com/dev/build?flush=all

    That will attempt to rebuild the database, which by the looks of it seems to be incomplete given the MySQL errors there.

    Cheers,
    Sean

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