Blog » I declare this site to be fully operational

I declare this site to be fully operational

Whilst this site looked like it was working just fine, I was having some trouble with the CMS. For example, the security, comments and files & images administration pages weren't working. On the public part of the site, the blog tags and archive links resulted in "page not found" errors. 

After a rather extensive search, the problem turned out to occur in Silverstripe's main entry file: sapphire/main.php. In line 149, it has the following:

baseURL = dirname(dirname($_SERVER['SCRIPT_NAME']));  

Silverstripe expects the server to return "/", because that is the base at which I had installed the CMS. However, for some reason, with longer URLs, (e.g., sub-pages within security, assets, comments and blog links such as tags and archives) my server appends the base directory of that page to $BaseURL. For example, the URL "blog/tags/Google" will set $baseURL to "/blog" instead of "/". As a result, it fails to find the appropriate files, and returns an error.

I have hard-coded $baseURL = '/'; for now. Changing this one line makes everything work properly

For reference, the web-hosting provider that I'm using is This was the lowest cost web-host that I could find in New Zealand that had the necessary functionality for Silverstripe. Their technical support was very responsive too, despite the low cost ($5.95 NZD/month). Anyone in New Zealand looking for a low-cost web-host for a simple site should consider them. 

So far I've found Silverstripe to be very easy to use, and I'd also recommend that people give it a try. I have almost zero experience in web-design and I managed to set this site up in a few days simply by taking one of their templates and customizing it a bit. In the interests of full disclosure, one of my friends works at Silverstripe, and he introduced me to their system. Having said that, I only recommend things that I truly think are good or worthwhile. The one warning that I have is that slow web-servers may find Silverstripe to be a bit much, and be rather sluggish as a result. Most servers should have no trouble at all.

Blog » I declare this site to be fully operational

Post your comment


No one has commented on this page yet.

RSS feed for comments on this page | RSS feed for all comments

Blog » I declare this site to be fully operational