Created
May 16, 2014 21:45
-
-
Save jedateach/dcc03feb3746863b8097 to your computer and use it in GitHub Desktop.
Localhost ss environment file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//set up reporting level, depending on ss version | |
if(strrpos($_SERVER['SCRIPT_NAME'], 'sapphire') !== false){ | |
error_reporting(E_ERROR | E_WARNING | E_PARSE); | |
}else{ | |
error_reporting(E_ALL); | |
} | |
define('SS_GEM_PATH', '/usr/bin/'); | |
define('SS_ENVIRONMENT_TYPE', 'dev'); | |
define('SS_DATABASE_SERVER', 'localhost'); | |
define('SS_DATABASE_USERNAME', 'root'); | |
define('SS_DATABASE_PASSWORD', ''); | |
define('SS_DATABASE_CHOOSE_NAME', true); | |
define('SS_DEFAULT_ADMIN_USERNAME', 'admin'); | |
define('SS_DEFAULT_ADMIN_PASSWORD', 'password'); | |
global $_FILE_TO_URL_MAPPING; | |
$_FILE_TO_URL_MAPPING['/Users/username/Sites'] = 'http://localhost'; | |
//change database for testing only & allow forcing mysql via get parameter | |
if(!isset($_REQUEST['forcemysql']) && !defined('SS_DATABASE_CLASS')){ | |
$istest = | |
(isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], '/dev/tests') !== false) || | |
(isset($_SERVER['argv']) && isset($_SERVER['argv'][1]) && strpos($_SERVER['argv'][1], 'dev/tests') === 0) || | |
class_exists("PHPUnit_Runner_Version"); | |
if($istest){ | |
define('SS_DATABASE_CLASS', 'SQLite3Database'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment