517 Posts in 279 Topics by 221 members
| Go to End | ||
| Author | Topic: | 4776 Views |
-
Re: Fasthosts

25 November 2010 at 11:06pm
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?
-
Re: Fasthosts

9 December 2010 at 3:12am Last edited: 9 December 2010 3:12am
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 OnRewriteCond %{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
| 4776 Views | ||
| Go to Top |

