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.

Installing SilverStripe /

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

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

Silverstripe on IIS 6.0 with Helicon ISAP Rewrite 3


Reply


6 Posts   3351 Views

Avatar
xterso

Community Member, 6 Posts

5 July 2009 at 9:57am

Edited: 05/07/2009 9:58am

Hello,

I want to use Silverstripe on a shared hosting. Helicone ISAPI Rewrite is installed on the server. When I try to install Silverstripe I get the following error;

Friendly URLs are not working. This is most likely because mod_rewrite isn't configuredcorrectly on your site. Please check the following things in your Apache configuration; you may need to get your web host or server administrator to do this for you:
mod_rewrite is enabled
AllowOverride All is set for your directory

Although I get this error, I can go to the home page of the website. But only the "Home page" since URL Rewrite is not functioning I guess because every menu button is opening the home page only and there is no CMS login page etc.

I have contacted to the hosting company. They told me that Helicon is fully compatible with apache mod_rewrite. Then I have googled a bit and found the following article on Helicon's web page;

http://www.helicontech.com/articles/ss.htm

Actually, SE-friendly feature is enabled by default. But SilverStripe does not originally support IIS and ISAPI_Rewrite. On the first page of the installation you may see this text:

Picture 1. Information messages in the installation.
If you open your web-site after SilverStripe installation, you will see the note that mod_rewrite is not enabled. Actually, SilverStripe tries to find mod_rewrite (only), and if the search is sucessfull, SilverStripe automatically creates rules in .htaccess file, and you get CMS working with SE-friendly URLs!

Thus under IIS we need to do some hacking. Let's just disable the check for mod_rewrite.
Please go to SilverStripe installation folder and open rewritetest.php file. Please find this code:

$testrewriting = file_get_contents($location);

if($testrewriting == 'OK') {
return true;
}And comment is out as follows:

//$testrewriting = file_get_contents($location);

//if($testrewriting == 'OK') {
   return true;
//}

Of course this article is about Silverstripe 2.2.2 but I think this doesn't matter. This article didn't help me anyway.

So far, I cannot install silverstripe correctly on ISS 6.0 with Helicon ISAPI Rewrite on a Windows 2003 Server.

Hosting company is open for any advice if there is a way to correct this problem on the server if it is a IIS or Helicon related problem.

Any advice, help is very much appreciated.

Avatar
xterso

Community Member, 6 Posts

5 July 2009 at 12:09pm

Edited: 05/07/2009 12:12pm

Replying my own question;

I found something. Please check this article;

http://cubiksoundz.blogspot.com/2008/12/tech-note-installing-silverstripe-cms.html

I have changed the install.php according to this article. Removed the following lines from install.php which is added to .htaccess file during the file creation;

<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>

<IfModule mod_rewrite.c>
$baseClause

Voila! Installation was successful! URL Rewrite is working, contact-us, about-us links work great!

But.. now there are some other problems;

1. Admin link doesn't work. Even the link http://www.barakahost.com/sapphire/main.php?url=main is not working at all.

2. I can access the login page via the link " http://www.barakahost.com/Security/login " but after entering password it just waits for a long time and I get the error "CGI Timeout. The specified CGI application exceeded the allowed time for processing. The server has deleted the process."

And I can't go further. Installation is done, some URL rewrite works but not all.

Would you help me guys to go further and solve this problem?

Avatar
Sam

Administrator, 685 Posts

6 July 2009 at 1:46pm

Did you modify the rewriting rules in exactly the way described on that tutorial, or did you just delete the line? There was a % that needed to be changed to a $....

Avatar
xterso

Community Member, 6 Posts

20 October 2009 at 11:40am

Hello,

I had given up after trying a lot of times with the silverstripe v2.3.2 and given myself a long break . Now I tried it with 2.3.3 and no luck. Nothing changed so far.

Replying your question;

No, I didn't delete the line, just modified it according to the tutorial. here is my .htaccess file.

### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

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

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

As you can see, the only difference is in the last rewriterule, changed .* sapphire/main.php?url=%1 into (.*) sapphire/main.php?url=$1

That's it. Installation works, but admin link doesn't!

By the way, the site is on a shared hosting. If this will help.

For now, I am done that I am not able to go further from here. Any help would be appreciated from anybody who could install silverstripe on a shared windows hosting and make it really work.

Hope there is someone out there. :)

Avatar
DennisNissen

Community Member, 1 Post

5 August 2010 at 9:07pm

Dirty walkaround :

make sure you turned off php error display and put this line into your sapphire/main.php below "Session::start" :

echo " ";

:) ... works for me.

Avatar
xterso

Community Member, 6 Posts

8 August 2010 at 10:33pm

Edited: 08/08/2010 10:35pm

Hello,

Thanks for reply. I had given up fighting with the installation of silverstripe quite a long time ago because I thought it would never work on a shared hosting.

I tried your advices, my friend, unfortunately helpless. This silverstripe is stable, works fine on a local server but unfortunately not on a shared hosting. At least it didn't work work for me on several shared hostings I tried on.

And apparently, the developers of silverstripe doesn't care much about that. Anyway, as I said I have already given up and been using other free and much more stable tools.

Thanks anyway.