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

Installation problem


Reply


19 Posts   14946 Views

Avatar
snecz

Community Member, 5 Posts

5 May 2008 at 6:25am

Can somebody help me with this?

Avatar
saimo

Community Member, 67 Posts

6 May 2008 at 2:24am

This looks like a mod_rewrite issue.

Try adding this below the 'RewriteEngine On' line in your .htaccess file:
RewriteBase /xyz

where 'xyz' is the base directory of the installation i.e. 'silverstripe'
RewriteBase /silverstripe

NOTE: I have not tested this, since I do not need this for my servers, but I believe this should be correct.

Avatar
Fuzz10

Community Member, 787 Posts

6 May 2008 at 3:26am

Seems that host is running an obscure HTTP server..
IdeaWebServer ??

You are not the first one to report this , please have a look @ this thread :
http://www.silverstripe.com/site-builders-forum/flat/2010

Avatar
saimo

Community Member, 67 Posts

6 May 2008 at 4:37am

Yes, that's probably the main problem now that we know the webserver is not apache2, though you would still need the line in .htaccess I think... (if the server was apache2)

Keep that in mind if you change host (the problem does seem to be unresolved in the other thread)

Avatar
snecz

Community Member, 5 Posts

7 May 2008 at 6:10am

Thanks for your advices.
I changed .htaccess file (in ss catalogue) and added line as you sugested RewriteBase /silverstripe.
But still nothing...
What can I do more?

Avatar
Sean

Forum Moderator, 922 Posts

7 May 2008 at 4:03pm

hi snecz,

Sorry you can't install SilverStripe on your particular host.

After doing a bit of research, it turns out that IdeaWebServer doesn't support .htaccess/mod_rewrite in the way that SS is set up to do so, specifically for Apache/Lighthttpd. It's very hard to find documentation on it in fact, because it's developed in-house for the Polish host home.pl, and so it's hard to determine exactly why there's a problem here. I've tried searching "ideawebserver .htaccess" on Google. I wish I could read the result websites, but they're all in Polish!

SilverStripe currently only supports Apache and lighthttpd for HTTP servers. Here are the server requirements for SilverStripe on our wiki:

[url]http://doc.silverstripe.com/doku.php?id=server-requirements[/url]

As you can see, there's a summary on the HTTP server requirements: "We currently support Apache and lighttpd. You could probably get it going on IIS, but we currently don’t provide support for this.".

The trouble with your particular host is the HTTP server it's running, that being IdeaWebServer. I believe the problem is the way SilverStripe re-writes the URLs, as there are specific rules to determine how the server should be displaying the URLs, for example, there's no real way to go to say, http://mysite.com/home.html in SilverStripe - which is probably why other CMS' work on this particular server.

I would suggest finding a host that uses Apache as the HTTP server to use SilverStripe, because it's very difficult to know how to debug one that doesn't have much widely known documentation available on the internet.

Cheers,
Sean

Avatar
jaytay

Community Member, 15 Posts

29 May 2008 at 3:59am

Howdy,
I have a similar problem as I would like to have my website not have the SS directory in the url structure (ie www.myurl.com/silverstripe/home)

Should I have installed SS in the root rather than a separate directory per the installation instructions?

I am installed on Dreamhost with PHP5
Thanks!

Avatar
daresh

Community Member, 2 Posts

27 July 2008 at 2:28am

Edited: 27/07/2008 2:36am

Hey!

I had the same problem while installing SilverStripe on my server at home.pl.

I've contacted my administrator and he made the following changes:

1. Modified .htaccess to:

RewriteEngine On

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

RewriteCond %{REQUEST_FILENAME} index..* [NC]
RewriteRule .* sapphire/main.php?url=/ [L]

2. In file 'sapphire/core/control/Controller.php' modified the function redirect()

from:

function redirect($url) {
if($this->response->getHeader('Location')) {
user_error("Already directed to " . $this->response->getHeader('Location') . "; now trying to direct to $url", E_USER_WARNING);
return;
}

// Attach site-root to relative links, if they have a slash in them
if($url == "" || $url[0] == '?' || (substr($url,0,4) != "http" && $url[0] != "/" && strpos($url,'/') !== false)){
$url = Director::baseURL() . $url;
}

$this->response->redirect($url);
}

to:

function redirect($url) {
if($this->response->getHeader('Location')) {
user_error("Already directed to " . $this->response->getHeader('Location') . "; now trying to direct to $url", E_USER_WARNING);
return;
}

// Attach site-root to relative links, if they have a slash in them
if($url == "" || $url[0] == '?' || (substr($url,0,4) != "http" && $url[0] != "/" && strpos($url,'/') !== false)){
$url = Director::baseURL() . $url;
}

// Zmiana typu przekierowania
if(substr($url, 0, 1) == '/') {
$url = 'http://' . $_SERVER[HTTP_HOST] . $url;
}

$this->response->redirect($url);
}

3. Line 91 in file core/ManifestBuilder.php has been commented out

//      $baseDir = ereg_replace("/[^/]+/\\.\\.", "", $baseDir);

And it now works fine! :-)

Question to Core Developers: Will I experience any future problems because of the changes?