Jump to:

4873 Posts in 7242 Topics by 1471 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Two sites and manifest-main

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: 1821 Views
  • Jarek
    Avatar
    Community Member
    30 Posts

    Two sites and manifest-main Link to this post

    Hello

    I've two SS sites at one server (one 2.3.2 version, second 2.3.1 version) and they don't work at the same time. I'v error "Object->set_uninherited() is deprecated" (in 2.3.2). I'v spotted that problem is in cache file manifest-main. Both sites are writing cache to c:\WINDOWS\silverstripe-cache and overwriting manifest-file. Why SS isn't wrting cache to own folder (silverstripe-cacheD--htdocs-XXX), how can I force wrting to seperate cache folders?

  • Jarek
    Avatar
    Community Member
    30 Posts

    Re: Two sites and manifest-main Link to this post

    Hello

    I've solved this error. Problem is in function getTempFolder() (Core.php) where is code:

    if(preg_match('/^(.*)\/sapphire\/[^\/]+$/', $_SERVER['SCRIPT_FILENAME'], $matches)).

    Used preg match rule works only on unix paths (where slashes are used). When are backslashes in path rule doesn't match.

    This is correct code:

    if(preg_match('/^(.*)[\/\\\\]sapphire[\/\\\\][^\/\\\\]+$/', $_SERVER['SCRIPT_FILENAME'], $matches)) {   
    $cachefolder = "silverstripe-cache" . str_replace(array(' ',"/",":", "\\"),"-", $matches[1]);
    } else {
    $cachefolder = "silverstripe-cache";
    }

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Two sites and manifest-main Link to this post

    Thanks for the patch, it has been applied to the development branch of 2.4 and will appear in the next 2.4 release.

    Here are the changesets: http://open.silverstripe.org/changeset/94134, http://open.silverstripe.org/changeset/94135 with a unit test to check the behaviour with different platforms.

    Sean

    1821 Views
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.