I am trying to determine the best values for temp and files settings for multi-site systems.
TEMP:
Is this a temporary, writable folder? Shouldn't it therefore typically '/tmp' on *nix servers and
($_ENV['TMP']) ? $_ENV['TMP'] : $_ENV['TEMP'];
on Windows servers?
FILES:
On a multi-site system shouldn't this be a separate folder for each site to avoid conflicts like the custom logo for default templates?
Currently I am using the following code in config.php and I want to know if my understanding of these variables is correct.
The actual code I am using is:
<?php
// Calculate the part of the table or database name
// if you want to ignore or include different tld or host parts
// add or remove them in the section below
$db_dompart = preg_replace('/(_org$|_com$|_ca$|_net$|^dev_|^www_|^new_|-)/i',
'',
strtr(trim(strtolower($_SERVER['HTTP_HOST']),'/'),'./','__'));
/*
* Set the temp folder based on current environment
* assumes that if on Windows, TMP or TEMP will be set, if
* on *nix, session.save_path will be set to any non-standard tmp
* otherwise it defaults to /tmp
*/
if ($SETTINGS_AUTO_TEMP) {
$tmp='/tmp';
if(isset($_ENV["TMP"])) { $tmp=$_ENV["TMP"]); }
elseif(isset($_ENV["TEMP"])) { $tmp=$_ENV["TEMP"]); }
elseif(ini_get('session.save_path')) {
$tmp=ini_get('session.save_path');