Jump to:

558 Posts in 3572 Topics by 244 members

Hosting Requirements

SilverStripe Forums » Hosting Requirements » Fasthosts

What you need to consider when choosing a hosting provider and plan.

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

Page: 1 2
Go to End
Author Topic: 5415 Views
  • bones
    Avatar
    Community Member
    104 Posts

    Re: Fasthosts Link to this post

    Still struggling with Fasthosts!

    Just had this reply from them:

    "Unfortunately we are unable to provide support on scripting issues. But in my past experience most Mod rewriting issues on our system are cause due to the developer trying to turn it on re-writing modules when using .htaccess files. On our system there is no need to turn the rewriting engine on and off or to tell the server to enable options as All these options are on by default. Calling engine on will cause the site to error, most re-writing functionality is possible on our system."

    Can anybody offer any suggestions about what this actually means?

  • stew
    Avatar
    Community Member
    30 Posts

    Re: Fasthosts Link to this post

    For those still having issues with Fasthosts I have finally managed to deploy two Silverstripe powered sites on their Linux Shared Hosting platform - it was a big headache but everything is now working.

    There are two steps involved, one is an amendment to the Core.php file courtesy of Matty Balaam in this thread.

    Amendment to the bottom of /sapphire/core/Core.php

    /**
    * Increase the time limit of this script. By default, the time will
    be unlimited.
    * @param $timeLimit The time limit in seconds. If omitted, no time
    limit will be set.
    */
    function increase_time_limit_to($timeLimit = null) {
    if(!ini_get('safe_mode')) {
    if(!$timeLimit) {
    } else {
    $currTimeLimit = ini_get('max_execution_time');
    if($currTimeLimit && $currTimeLimit < $timeLimit) {
    }
    }
    }
    }

    ?>

    Step two is the alteration of various .htaccess files. Fasthosts seem to be preventing anything but mod_rewrite rules from being used in .htaccess files, so the main .htaccess in the root is below:

    # Use PHP5 as default
    #AddHandler application/x-httpd-php5 .php

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

    <IfModule mod_rewrite.c>
    RewriteEngine On

    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]
    </IfModule>
    ### SILVERSTRIPE END ###

    You will need to comment out the deny/allow rules in cms/.htaccess and sapphire/.htaccess

    Hope that helps. The biggest suggestion I'd give is host elsewhere but I was stuck with a client who had already paid for a full year of hosting with Fasthosts... :S

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