Jump to:

4945 Posts in 17703 Topics by 1494 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Migration Install Woes

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

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

Page: 1
Go to End
Author Topic: 968 Views
  • DanR
    Community Member
    3 Posts

    Migration Install Woes Link to this post

    Hi there,
    Hoping someone can help as I've spent an unhealthy amount of time now trying to get SilverStripe to work. This is the first time I've touched a SilverStripe site, so while I'm not a noob to the dev world, a level of understanding would be appreciated!

    I'm trying to migrate a SilverStripe site from a web developer's inhouse server to MediaTemple. The outgoing server is running PHP 5.1.6, while the MT server is running PHP 5.3.8, and the SilverStripe version is 2.3.0. (I'm really hoping it's not the versions that are causing these issues!)

    So I've imported the dumped DB and copied across the httpdocs folder to the new host. Set up the DB connection strings, thinking I'm good to go.

    Get a 403 Forbidden message, and its off to the trusty forums! Cross check perms with (still live) site, all good. Find a post that talks about rewrites and references '/rewritetest.php', so I run that, and get the (apparently infamous)

    mod_rewrite is enabled in your httpd.conf
    AllowOverride is enabled for the current path.

    I run a phpinfo on both the outgoing server (yup, it's enabled) and the new one (uh-oh, hold the phone), so start researching this one through the forums and come upon people talking about the .htaccess mods. So I put those in:

    RewriteEngine On
    RewriteBase /
    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]
    Options FollowSymLinks

    and now I'm the closest I've been in roughly 17 hours of working on this (tried to install on XAMPP to test the process first, silly idea that), and now have the site loading, albeit with a page of errors above telling me things like:

    Deprecated: Function ereg_replace() is deprecated in /...../html/sapphire/core/ManifestBuilder.php on line 257


    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/..../html/.htaccess/_config.php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /..../html/sapphire/core/i18n.php on line 1074


    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/..../html/favicon.ico/_config.php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /..../html/sapphire/core/i18n.php on line 1074

    (Note: those are my ellipses inserted in the path for security reasons)

    So my question is, what the hell do I do now? I'm supposed to be making this site live in a few hours time, and I'm reasonably close to throwing things out of windows...

    Many thanks!

  • martimiz
    Forum Moderator
    1091 Posts

    Re: Migration Install Woes Link to this post

    Hi DanR,

    Sorry I didn't see this one before now. Hope you haven't had to throw everything out of the window... Your problem almost certainly results from an old version of Silverstripe not being compatible with php 5.3...

    There's a 2009 topic here http://www.silverstripe.org/installing-silverstripe/show/6502 that refers to this issue, but I don't think it has a simple answer. i seem to recall it being solved in later versions of 2.3, so you could try downloading the latest 2.3 CMS and Saphire modules from github - I saw 2.3 branches still being available: https://github.com/silverstripe

    If all else fails, upgrading to 2.4 may be an option...

    Hope this helps..

  • DanR
    Community Member
    3 Posts

    Re: Migration Install Woes Link to this post

    Hi Martimiz,
    Many thanks for replying! Nothing physical went out the window - my sanity however is being sorely tested...

    I've worked out some of the issues in that I was trying to run the site on a MediaTemple GS service, which doesn't allow access to httpd.conf to add the "AllowOverride All" rule. I'm not sure if this was a cause of the problem, but I'm happy now to at least be able to rule it out, just in case)

    Consequently (and because I was probably due anyway), I've now upgraded to a DV service - which of course presents a couple new questions. If you or others can offer any insights, I'd be most appreciable, Apache configs are definitely not my strong point.

    Q1. I've created a vhost.conf file in the path "/var/www/vhosts/mydomain.com/conf", to set the AllowOverride All at a domain level in the config, but would like to confirm it contains the right info:

    <Directory /var/www/vhosts/mydomain.com>
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all

    Is that correct?

    Q2: Having now migrated the DB and site files as per other forum comments I've found, and taking your own comment in hand, can I (and if so how?) do an "in-place" upgrade to SilverStripe V2.4 without overwriting the site's content?

    (I tried the XAMPP approach of clean installing 2.4 and then importing the DB and site files, and running the /dev/build?flush=1 command to rebuild but I get page load or require_once errors (specifically PHPUnit/Util/Report.php to which it says there's no such file or directory)

    Again, any help offered is much appreciated.

  • DanR
    Community Member
    3 Posts

    Re: Migration Install Woes Link to this post

    Update: Following a tweet in the right direction (@silverstripe), Matt from Stripe The Web (http://www.stripetheweb.co/) got in touch with me and has resolved the installation troubles I was having. For the record (and from what I understand), I wasn't being helped by a massively complicated _config.php file which he's now fixed up, along with a correctly configured .htaccess file.

    (I haven't confirmed if the vhosts.comf file I created was correct, but the site is working, so I guess so!)

    Matt's help was invaluable to resolving this, he was quick to understand the issue, and just as quick fixing it. If you're stuck with something, look him up.

    Thanks also to Martimiz for your suggestion of the upgrade, I'm still looking at that, but with the site now working, it can go on the "nice to have" list. ;)


Page: 1
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.