4848 Posts in 5039 Topics by 1458 members
|Go to End|
8 August 2012 at 2:48am Last edited: 8 August 2012 2:49am
Dear SS Team,
nice to use your Framework and CMS. But it will be much more efficenity if we could use onle ONE "framework" and "cms" codebase. SS doesnt allow to symlink both folders in a Project. So every time a need to copy and maintain 50MB of the same files in each Project.
Is it so hard to use a alternative include and require strategy to solve that Problem??!!
Hope you will answer to this Topic.
8 August 2012 at 8:38pm
You should be able to symlink cms, framework fine. Though each of your sites will need to define a TEMP_FOLDER const in the _config.php
21 August 2012 at 11:37pm Last edited: 21 August 2012 11:37pm
Adding the TEMP_FOLDER constant to _config.php seems to be too late in the startup-process. I had to add it to _ss_environment.php to make it work. Eg.
When a folder called tmp is in the same directory structure (eg. webroot) as the _ss_environment.php file.
There's another issue though: If you don't serve pages via index.php, the BASE_PATH will be wrong and Core.php will search for a _ss_environment.php file in the real location of the framework folder (not the symlinked framework folder).
Adding the following lines to an _ss_environment.php file in the same folder as the real framework folder correctly sets the base-path
// make BASE_PATH point to the directory where the symlinked framework folder resides!
define('BASE_PATH', rtrim(dirname(dirname($_SERVER['SCRIPT_FILENAME'])), DIRECTORY_SEPARATOR));
// set temp folder accordingly
define('TEMP_FOLDER', BASE_PATH . DIRECTORY_SEPARATOR . 'tmp');
The code above fixes all issues I had with symlinking the framework and cms folders to several sites.
|Go to Top|