Added dev/prod config
This commit is contained in:
36
www/protected/config/env/dev.php
vendored
Normal file
36
www/protected/config/env/dev.php
vendored
Normal 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
25
www/protected/config/env/prod.php
vendored
Normal 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,
|
||||
)
|
||||
);
|
||||
@@ -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'));
|
||||
@@ -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',
|
||||
),
|
||||
*/
|
||||
),
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user