Skip to content

Instantly share code, notes, and snippets.

@anthonyshort
Created February 19, 2010 05:23
Show Gist options
  • Save anthonyshort/308456 to your computer and use it in GitHub Desktop.
Save anthonyshort/308456 to your computer and use it in GitHub Desktop.
<?php
if ( ! defined('EXT'))
{
exit('Invalid file request');
}
$SERVER_NAME = $_SERVER['SERVER_NAME'];
$SITE_URL = "http://{$SERVER_NAME}";
$ENVIRONMENT = '';
if ( strstr( $SERVER_NAME, 'dev' ) )
{
$ENVIRONMENT = 'DEVELOPMENT';
}
elseif ( strstr( $SERVER_NAME, 'test' ) )
{
$ENVIRONMENT = 'TEST';
}
elseif ( strstr( $SERVER_NAME, 'local' ) )
{
$ENVIRONMENT = 'LOCAL-DEVELOPMENT';
}
else
{
$ENVIRONMENT = 'PRODUCTION';
}
# If no environment was set, we're not going to continue - exit and print an error.
if ( $ENVIRONMENT == '' )
{
exit('The server environment was not defined.');
}
if ( $ENVIRONMENT == 'LOCAL-DEVELOPMENT' )
{
$conf['db_type'] = 'mysql';
$conf['db_prefix'] = 'exp';
$conf['db_conntype'] = '0';
$conf['db_hostname'] = 'localhost';
$conf['db_name'] = '';
$conf['db_username'] = '';
$conf['db_password'] = '';
$conf['app_root'] = '';
}
elseif ( $ENVIRONMENT == 'DEVELOPMENT' )
{
$conf['db_type'] = 'mysql';
$conf['db_prefix'] = 'exp';
$conf['db_conntype'] = '0';
$conf['db_hostname'] = '';
$conf['db_name'] = '';
$conf['db_username'] = '';
$conf['db_password'] = '';
$conf['app_root'] = '';
}
elseif ( $ENVIRONMENT == 'PRODUCTION' )
{
$conf['db_type'] = 'mysql';
$conf['db_prefix'] = 'exp';
$conf['db_conntype'] = '0';
$conf['db_hostname'] = '';
$conf['db_name'] = '';
$conf['db_username'] = '';
$conf['db_password'] = '';
$conf['app_root'] = '';
}
# Core EE Path Configuration
$conf['cp_url'] = $SITE_URL . "/ee-admin/index.php";
$conf['tmpl_file_basepath'] = $conf['app_root'] . '/themes/site_themes/default';
$conf['theme_folder_url'] = $SITE_URL . '/themes';
$conf['theme_folder_path'] = $conf['app_root'] . '/themes';
$conf['captcha_url'] = $SITE_URL . '/images/captchas';
$conf['captcha_path'] = $conf['app_root'] . '/images/captchas';
$conf['avatar_url'] = $SITE_URL . '/images/members/avatars';
$conf['avatar_path'] = $conf['app_root'] . '/images/members/avatars';
$conf['app_version'] = '168';
$conf['license_number'] = '';
$conf['debug'] = '1';
$conf['install_lock'] = '1';
$conf['system_folder'] = 'ee-admin';
$conf['doc_url'] = 'http://expressionengine.com/docs/';
$conf['cookie_prefix'] = '';
$conf['is_system_on'] = 'y';
$conf['allow_extensions'] = 'y';
$conf['multiple_sites_enabled'] = 'n';
$conf['user_module_key_expiration'] = '30';
$conf['enable_online_user_tracking'] = 'y';
$conf['enable_hit_tracking'] = 'y';
$conf['enable_entry_view_tracking'] = 'y';
$conf['dynamic_tracking_disabling'] = 'n';
# Extensions Path Configuration
$conf['htaccess_path'] = $conf['app_root'];
$conf['ft_path'] = $conf['app_root'] . '/ee-admin/extensions/fieldtypes/';
$conf['ft_url'] = $SITE_URL . "/" . $conf['system_folder'] . '/extensions/fieldtypes/';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment