1
0

Added dev/prod config

This commit is contained in:
2014-05-13 13:16:39 +02:00
parent 99d29b432b
commit 5e21ecb401
6 changed files with 487 additions and 47 deletions

36
www/protected/config/env/dev.php vendored Normal file
View File

@@ -0,0 +1,36 @@
<?php
return array(
'components'=>array(
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=db451718',
'username' => 'root',
'password' => '',
'enableProfiling' => true,
'enableParamLogging' => true,
'charset' => 'utf8',
),
'errorHandler'=>array(
'errorAction'=>'site/error',
),
),
'params' => array(
'yii.debug' => true,
'yii.traceLevel' => 3,
'yii.handleErrors' => true,
),
'modules'=>array(
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'giipw',
'ipFilters'=>array('127.0.0.1','::1'),
),
),
);

25
www/protected/config/env/prod.php vendored Normal file
View File

@@ -0,0 +1,25 @@
<?php
return array(
'components' => array(
'db' => array(
'connectionString' => 'mysql:host=rdbms.strato.de;dbname=DB451718',
'username' => 'U451718',
'password' => 'Datenbank',
'enableProfiling' => false,
'enableParamLogging' => false,
'charset' => 'utf8',
),
'errorHandler'=>array(
'errorAction'=>'site/error',
),
),
'params' => array(
'yii.debug' => false,
'yii.traceLevel' => 3,
'yii.handleErrors' => false,
)
);

View File

@@ -5,7 +5,11 @@
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
require_once('protected/lib/ArrayX.php');
use Yiinitializr\Helpers\ArrayX;
return ArrayX::merge(array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'My Web Application',
@@ -19,15 +23,7 @@ return array(
),
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'Enter Your Password Here',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
),
),
// application components
@@ -47,23 +43,7 @@ return array(
),
),
*/
'db'=>array(
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
),
// uncomment the following to use a MySQL database
/*
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=testdrive',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
),
*/
'errorHandler'=>array(
// use 'site/error' action to display errors
'errorAction'=>'site/error',
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
@@ -87,4 +67,4 @@ return array(
// this is used in contact page
'adminEmail'=>'webmaster@example.com',
),
);
), require_once('env/' . YII_CUSTOM_ENV . '.php'));

View File

@@ -1,17 +0,0 @@
<?php
return CMap::mergeArray(
require(dirname(__FILE__).'/main.php'),
array(
'components'=>array(
'fixture'=>array(
'class'=>'system.test.CDbFixtureManager',
),
/* uncomment the following to provide test database connection
'db'=>array(
'connectionString'=>'DSN for test database',
),
*/
),
)
);