9

Having read through this discussion Config Bootstrap Options, and settled on using the method described on nettuts here, I've got myself a base build for EE with all my usual addons etc. That's all working very nicely, with one annoying exception.

Setting site_name in config seems to have no effect what so ever!

$config['site_name'] = "Base ExpressionEngine Install";

Is there anything I'm doing wrong, or does this just not work? I've tried clearing the cache via the CP, but that made no difference.

These are just stand-alone sites, not MSM.

Here is the rest of my config file for reference:

<?php

if ( ! defined('EXT'))
{
exit('Invalid file request');
}

/**
* THIS FILE WILL NEED PERMISSIONS SET TO 400 OR SIMILAR SO EE DOESN'T OVERWRITE IT.
*/

/*
|--------------------------------------------------------------------------
| ExpressionEngine Config Items
|--------------------------------------------------------------------------
|
| The following items are for use with ExpressionEngine.
|
*/

/* Universal Variables */

$config['app_version'] = "253";
$config['license_number'] = "0000-0000-0000-0000";
$config['debug'] = "1";
$config['install_lock'] = "";
$config['system_folder'] = "sys";
$config['doc_url'] = "http://expressionengine.com/user_guide/";
$config['is_system_on'] = "y";
$config['cookie_prefix'] = "";
$config['site_name'] = "Base ExpressionEngine Install";
$config['allow_extensions'] = "y";

/* General
-------------------------------------------------------------------*/
$config['site_index'] = "";
$config['site_url'] = "http://".$_SERVER['HTTP_HOST'];
$config['server_path'] = $_SERVER['DOCUMENT_ROOT'];
$config['cp_url'] = $config['site_url']."/admin.php";

/* Dynamic database connection settings
-------------------------------------------------------------------*/

switch ( $config['site_url'] ) { 
// local
case 'http://dev.example.com' :
    $db['expressionengine']['hostname'] = "localhost";
    $db['expressionengine']['username'] = "admin";
    $db['expressionengine']['password'] = "password";
    $db['expressionengine']['database'] = "dev-db";
  break;

// staging
case 'http://staging.example.com' :
    $db['expressionengine']['hostname'] = "mysql.exampleserver.com";
    $db['expressionengine']['username'] = "admin";
    $db['expressionengine']['password'] = "password";
    $db['expressionengine']['database'] = "staging-db";
break;

// live
default :
    $db['expressionengine']['hostname'] = "mysql.exampleserver.com";
    $db['expressionengine']['username'] = "admin";
    $db['expressionengine']['password'] = "password";
    $db['expressionengine']['database'] = "live-db";
break;

}

/* Universal database connection settings
-------------------------------------------------------------------*/
$active_group = 'expressionengine';
$active_record = TRUE;
$db['expressionengine']['dbdriver'] = "mysql";
$db['expressionengine']['dbprefix'] = "exp_";
$db['expressionengine']['pconnect'] = FALSE;
$db['expressionengine']['swap_pre'] = "exp_";
$db['expressionengine']['db_debug'] = FALSE;
$db['expressionengine']['cache_on'] = FALSE;
$db['expressionengine']['autoinit'] = FALSE;
$db['expressionengine']['char_set'] = "utf8";
$db['expressionengine']['dbcollat'] = "utf8_general_ci";
$db['expressionengine']['cachedir'] = $config['server_path'].$config['system_folder']."/expressionengine/cache/db_cache/";

/* Member directory paths and urls
-------------------------------------------------------------------*/
$config['avatar_url'] = $config['site_url']."/uploads/system/avatars/";
$config['avatar_path'] = $config['server_path']."/uploads/system/avatars/";
$config['photo_url'] = $config['site_url']."/uploads/system/member_photos/";
$config['photo_path'] = $config['server_path']."/uploads/system/member_photos/";
$config['sig_img_url'] = $config['site_url']."/uploads/system/signature_attachments/";
$config['sig_img_path'] = $config['server_path']."/uploads/system/signature_attachments/";
$config['prv_msg_upload_path'] = $config['server_path']."/uploads/system/pm_attachments/";

/* Misc directory paths and urls
-------------------------------------------------------------------*/
$config['theme_folder_url'] = $config['site_url']."/assets/themes/";
$config['theme_folder_path'] = $config['server_path']."/assets/themes/";

/* Templates Preferences
-------------------------------------------------------------------*/
$config['save_tmpl_files'] = "y";
$config['tmpl_file_basepath'] = $config['server_path']."/assets/templates/";
$config['site_404'] = "404/index";
$config['strict_urls'] = "n";

// END EE config items

/*
|--------------------------------------------------------------------------
| CodeIgniter Config Items
|--------------------------------------------------------------------------
|
| The following items are for use with CodeIgniter.
|
*/
$config['base_url'] = $config['site_url']."/";
$config['index_page'] = "";
$config['uri_protocol'] = "AUTO";
$config['url_suffix'] = "";
$config['language'] = "english";
$config['charset'] = "UTF-8";
$config['enable_hooks'] = FALSE;
$config['subclass_prefix'] = "EE_";
$config['permitted_uri_chars'] = "a-z 0-9~%.:_\-";
$config['enable_query_strings'] = FALSE;
$config['directory_trigger'] = "D";
$config['controller_trigger'] = "C";
$config['function_trigger'] = "M";
$config['log_threshold'] = 0;
$config['log_path'] = "";
$config['log_date_format'] = "Y-m-d H:i:s";
$config['cache_path'] = "";
$config['encryption_key'] = "";
$config['global_xss_filtering'] = FALSE;
$config['csrf_protection'] = FALSE;
$config['compress_output'] = FALSE;
$config['time_reference'] = "local";
$config['rewrite_short_tags'] = TRUE;
$config['proxy_ips'] = "";


/* End of file config.php */
/* Location: ./system/expressionengine/config/config.php */
  • 2
    I don't know, I seem to remember this being a bug though, I will have to double check that to be the case as for some reason I remember it being with $config['site_label'] vs $config['site_name'] being the problem – Natetronn Dec 13 '12 at 12:02
  • Thanks Natetronn. Looks like GDMac has found the bug on EE bug tracker for us :) – Steve Holland Dec 13 '12 at 12:47
10

To be able to actually use the "site_name" and for it to work,
you need to hack the core
https://support.ellislab.com/bugs/detail/15461/#8283

or install an extension i developed for this.
http://devot-ee.com/add-ons/override_site_name

edit Instead of in the config.php file,
You can override site_name in the main index.php
$assign_to_config['site_name'] ='Name'

| improve this answer | |
  • Thanks GDmac, looks like it's a known issue. Many thanks for the workarounds. Hopefully it might get fixed soon. – Steve Holland Dec 13 '12 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.