Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Installing SilverStripe /

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

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

Two sites and manifest-main


Go to End


3 Posts   2220 Views

Avatar
Jarek

Community Member, 30 Posts

15 July 2009 at 8:58pm

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?

Avatar
Jarek

Community Member, 30 Posts

31 July 2009 at 1:23am

Edited: 31/07/2009 1:27am

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";
  }

Avatar
Sean

Forum Moderator, 922 Posts

1 December 2009 at 11:48pm

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