4571 Posts in 1382 Topics by 1376 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1703 Views |
-
Two sites and manifest-main

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?
-
Re: Two sites and manifest-main

31 July 2009 at 1:23am Last edited: 31 July 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";
} -
Re: Two sites and manifest-main

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
| 1703 Views | ||
|
Page:
1
|
Go to Top |


