Uploads are currently broken on provisioned sites, because they try to upload into 'files'
The configurations generated already have a conditional include to load a global.inc, but it is pointing to inside the drupal checkout.
This should be placed in the PROVISION_CONFIG_PATH , so probably config/drupal/global.inc (outside of the web root).
This is what we have in our hm1 global.inc
/**
* PHP settings:
*
* To see what PHP settings are possible, including whether they can
* be set at runtime (ie., when ini_set() occurs), read the PHP
* documentation at http://www.php.net/manual/en/ini.php#ini.list
* and take a look at the .htaccess file to see which non-runtime
* settings are used there. Settings defined here should not be
* duplicated there so as to avoid conflict issues.
*/
ini_set('arg_separator.output', '&');
ini_set('magic_quotes_runtime', 0);
ini_set('magic_quotes_sybase', 0);
ini_set('session.cache_expire', 200000);
ini_set('session.cache_limiter', 'none');
ini_set('session.cookie_lifetime', 0);
ini_set('session.gc_maxlifetime', 200000);
ini_set('session.save_handler', 'user');
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid', 0);
ini_set('url_rewriter.tags', '');
global $conf;
$conf['file_directory_path'] = conf_path() . '/files';
$conf['file_directory_temp'] = conf_path() . '/files/tmp';
$conf['file_downloads'] = 1;
$conf['cache'] = 1;
$conf['clean_url'] = 1;
/**
* This was added from Drupal 5.2 onwards.
*/
/**
* We try to set the correct cookie domain. If you are experiencing problems
* try commenting out the code below or specifying the cookie domain by hand.
*/
if (isset($_SERVER['HTTP_HOST'])) {
$domain = '.'. preg_replace('`^www.`', '', $_SERVER['HTTP_HOST']);
// Per RFC 2109, cookie domains must contain at least one dot other than the
// first. For hosts such as 'localhost', we don't set a cookie domain.
if (count(explode('.', $domain)) > 2) {
ini_set('session.cookie_domain', $domain);
}
}
Comments
Comment #1
anarcat commentedI changed the template so it includes from PROVISION_CONFIG_PATH. I'm not sure how or where to generate the global.inc file though... platform verify?
Comment #2
adrian commentedI'm thinking i should just add this to the settings.php code template. Makes more sense than trying to keep a central php file updated for all platforms, or keeping a global.inc per platform.
Comment #3
anarcat commentedI agree.
Comment #4
adrian commentedcommitted into head.
Comment #5
adrian commentedThis does cause some warnings, because of ini_set in settings.php files. This is kind of expected, and theres nothing we can do about this,
so during import i re-include the settings.php of the provisioning site, so it at least sets back to what it had before.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.