Jump to:

17478 Posts in 4473 Topics by 1972 members

Archive

SilverStripe Forums » Archive » Installing on kiwihosting.net.nz

Our old forums are still available as a read-only archive.

Page: 1
Go to End
Author Topic: Installing on kiwihosting.net.nz 637 Views
  • HansR
    avatar
    Community Member
    102 posts

    Installing on kiwihosting.net.nz Link to this post

    I've finally sorted out all the problems with running Silverstripe on kiwihosting.net.nz. I've posted the installation procedure on my own blog, but it makes most sense to post them here too. So here it is:

    Installing Silverstripe on Kiwihosting.net.nz

    Download the latest Silverstripe archive and decompress it to a directory. Open up sapphire/main.php, and search for the following line:

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

    Replace this line with:

    $baseURL = "/";

    In version 2.2.2, this is at line 149. Upload the Silverstripe files to the server as per normal installation. Next, create a new .htaccess file containing the following:

    php_flag zend.ze1_compatibility_mode Off
    php_value allow_call_time_pass_reference on
    php_value register_globals off

    ### SILVERSTRIPE START ###
    RewriteEngine On
    RewriteBase /

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

    Upload this .htaccess file to the root directory of the server. Next, complete the standard installation procedure. The server may complain that mod-rewrite is not working; this is okay. At this point, you may need to upload the .htaccess file again, because the installer may change it.

    Download the file mysite/_config.php (via FTP). Add the following line:

    Director::setBaseURL('/');

    Now upload mysite/_config.php back to the server. Silverstripe should now be installed, and work correctly.

  • Double-A-Ron
    avatar
    Community Member
    511 posts

    Re: Installing on kiwihosting.net.nz Link to this post

    php_value register_globals off

    Some hosts still have globals turned on????

  • HansR
    avatar
    Community Member
    102 posts

    Re: Installing on kiwihosting.net.nz Link to this post

    Some hosts still have globals turned on????
    They probably don't. I messed around with the files quite a bit, trying things that others suggested. The most important line in the .htaccess file is the first one. It will probably work without the other two lines below the first one, but I didn't experiment further, so I left them in.

    Hans

    637 Views
Page: 1
Go to Top

Currently Online: There is nobody online.

Welcome to our latest member: SideOne

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.