Jump to:

4938 Posts in 16827 Topics by 1490 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Installing 2.2.3: mod_rewrite troubles

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

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

Page: 1 2 3 4
Go to End
Author Topic: 9866 Views
  • Stoke
    Avatar
    Community Member
    8 Posts

    Re: Installing 2.2.3: mod_rewrite troubles Link to this post

    I found this link .. which is kind of bizzare: http://forum.siteground.com/showthread.php?p=22645

    - quote begin (Actually using [ quote ] makes it so small that it's unreadable ! )
    Hi,

    I just recently went through a painfulll silverstripe install and wanted to give some feedback. This error occurs on mo_rewrite test but is not caused by mod_rewrite, your siteground account should be set up for mod rewrite. The following link has simple code for testing mod_rewrite http://www.wallpaperama.com/forums/h...abled-t40.html

    To fix the error on a standard install on siteground simply follow the instructions below. Hope this saves somebody some time.

    ***** silversripe httprespond installin Error on Siteground *******

    - reason, silverstripe uses a HttpReference class that is already being called by php
    - also causes mod_rewrite test to fail

    Solution:
    1) Open your copy new of the silverstripe install files.
    2) Go to "sapphire/core/control/HTTPResponse.php" and rename it to "sapphire/core/control/SSHTTPResponse.php "
    3) Open the new SSHTTPResponse.php and edit the HTTPResponse class to read SSHTTPResponse. Look through the file and change any other references to HTTPResponse to SSHTTPResponse.
    4) Open the following files and change all references to the HTTPResponse to SSHTTPResponse.:
    - sapphire/core/control/ContentNegotiator.php
    - sapphire/core/control/Director.php
    - sapphire/core/control/Controller.php
    - sapphire/forms/Form.php

    Save and upload all the files to their respective directories and run the silverstripe install.

    ************** Enjoy*************

    - quote end

  • RonG
    Avatar
    Community Member
    11 Posts

    Re: Installing 2.2.3: mod_rewrite troubles Link to this post

    Thanks for the suggestions. The installation is unfortunately still aborted with the exact same message.

    Accessing http://silverstripe/InstallerTest/testrewrite in the browser (IE7) after the installation failed does give me a good result ("OK"), so is really not mod_rewrite causing the troubles here...

    The strange thing is that I was able to install a previous version of SilverStripe on the exact same environment (Windows XP running an up to date installation of WampServer, www.wampserver.com) a couple of monhts ago.

    Regards,

    Ron

  • Stoke
    Avatar
    Community Member
    8 Posts

    Re: Installing 2.2.3: mod_rewrite troubles Link to this post

    Absolutely bizzare.

  • RonG
    Avatar
    Community Member
    11 Posts

    Re: Installing 2.2.3: mod_rewrite troubles Link to this post

    With help on IRC, I was able to solve this issue and install version 2.2.3 of SilverStripe.

    The installation created the following line in .htaccess:

    RewriteBase \

    However, this should be:

    RewriteBase /

    Thanks.

    Ron

  • Stoke
    Avatar
    Community Member
    8 Posts

    Re: Installing 2.2.3: mod_rewrite troubles Link to this post

    Thanks for posting that here Ron.
    Lol.
    Simple error really ... ouch.

  • Riel
    Avatar
    Community Member
    3 Posts

    Re: Installing 2.2.3: mod_rewrite troubles Link to this post

    I get this message about 1 second before it pops away:

    Installing SilverStripe...

    I am now running through the installation steps (this should take about 30 seconds)

    If you receive a fatal error, refresh this page to continue the installation

    Creating 'mysite/_config.php'...
    Creating /var/www/silver/mysite/_config.php
    Creating '.htaccess' file...
    Creating /var/www/silver/.htaccess
    Building database schema...
    Checking mod_rewrite works
    http://**myip**/silver/InstallerTest/testrewrite Rewrite is DirectorySlash Off RewriteEngine On RewriteBase /silver RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$ RewriteCond %{REQUEST_URI} ^(.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* /var/www//sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    Creating /var/www/silver/.htaccess http://**myip**/silver/InstallerTest/testrewrite
    ERROR: mod_rewrite not working, redirecting to mod_rewrite test page
    Creating /var/www/silver/.htaccess I will now try and direct you to rewritetest to troubleshoot mod_rewrite

    I looked in 'install.php' and it says this:

    if($base != '.') $baseClause = "RewriteBase $base\n";
    else $baseClause = "";

          
          $rewrite = <<<TEXT
    <IfModule mod_dir.c>
    DirectorySlash Off
    </IfModule>

    RewriteEngine On
    $baseClause
    RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$

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

    LIke after $rewrite = <<<TEXT

    something goes wrong...

    Directoryslash OFF and Rewriteengine ON should not be echo's, but are instructions, like the rest of the code?

    Am I right?

    Tried EVERY option in these threads, but can';t get it to install. Mod rewrite and those things are absolutedly sure allright ;)

  • saemmi
    Avatar
    Community Member
    6 Posts

    Re: Installing 2.2.3: mod_rewrite troubles Link to this post

    I have exactly the same Problem as Riel. And it's really frustrating after trying everything in every thread. And it still doesn't work.

    I am running
    -Vista 64
    -Xampp 1.7.0
    (=> Php 5.2.8, Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 )

    Do you guys think there's the same problem when using linux? (Actually I will try when there's no progress with this problem...)

  • Riel
    Avatar
    Community Member
    3 Posts

    Re: Installing 2.2.3: mod_rewrite troubles Link to this post

    Well, bad news: i'm trying in Linux (Ubuntu 8.04).

    I have given up allready. Maybe the answer is not known, but I expected a bit more from a CMS who was stated as number one (the reason I came here ...)... No answer in few weeks... that's really too bad, everything looks great!

    9866 Views
Page: 1 2 3 4
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.