Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (file_exists(PATH_ROOT . '/protected/config/develop.php')) {
- $developConfig = require_once(PATH_ROOT . '/protected/config/develop.php');
- }
- if (file_exists(PATH_ROOT . '/protected/config/production.php')) {
- $productionConfig = require_once(PATH_ROOT . '/protected/config/production.php');
- }
- // uncomment the following to define a path alias
- // Yii::setPathOfAlias('local','path/to/local-folder');
- // This is the main Web application configuration. Any writable
- // CWebApplication properties can be configured here.
- $result = array(
- 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
- 'name'=>'Cabinet tltdgkh',
- 'language' => 'ru',
- // preloading 'log' component
- 'preload'=>array('log'),
- // autoloading model and component classes
- 'import'=>array(
- 'cab.models.*',
- 'application.forms.*',
- 'application.components.*',
- 'cab.extensions.*',
- 'application.views.helpers.*',
- 'cab.extensions.mailer.EMailer',
- 'cab.extensions.runactions.components.ERunActions',
- 'cab.extensions.EHttpClient.*',
- ),
- // application components
- 'components'=>array(
- 'user'=>array(
- // enable cookie-based authentication
- 'allowAutoLogin'=>true,
- 'class'=>'WebUser',
- 'loginUrl'=>'/site/login'
- ),
- 'session' => array (
- 'autoStart' => empty($_POST['PHPSESSID']),
- 'cookieMode' => 'only',
- 'class' => 'application.components.MyCDbHttpSession',
- 'connectionID' => 'db',
- 'sessionTableName' => 'session',
- 'timeout' => 3600*24*30, // 30 days
- 'useTransparentSessionID' => !empty($_POST['PHPSESSID']),
- 'autoStart' => 'true',
- 'autoCreateSessionTable' => true,
- //Extension properties
- 'compareIpAddress'=>true,
- 'compareUserAgent'=>true,
- 'compareIpBlocks'=>0
- ),
- // uncomment the following to enable URLs in path-format
- 'urlManager'=>array(
- 'urlFormat'=>'path',
- 'showScriptName' => false,
- 'urlSuffix' => '/',
- 'rules'=>array(
- '' => 'users',
- '<controller:\w+>/<id:\d+>'=>'<controller>/view',
- '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
- '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
- 'login'=>'site/login',
- 'logout'=>'site/logout',
- ),
- ),
- /*'db'=>array(
- 'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
- ),*/
- // uncomment the following to use a MySQL database
- 'db'=>array(
- 'connectionString' => 'mysql:host=localhost;dbname=tltdgkh',
- 'emulatePrepare' => true,
- 'username' => 'root',
- 'password' => '11',
- 'charset' => 'utf8',
- 'tablePrefix' => 'yii_'
- ),
- 'authManager'=>array(
- 'class'=>'CDbAuthManager',
- 'connectionID' => 'db'
- ),
- 'errorHandler'=>array(
- // use 'site/error' action to display errors
- 'errorAction'=>'site/error',
- ),
- 'log'=>array(
- 'class'=>'CLogRouter',
- 'routes'=>array(
- array(
- 'class'=>'CFileLogRoute',
- 'levels'=>'error, warning',
- ),
- array(
- 'class' => 'MyCEmailLogRoute',
- 'levels' => 'error, warning',
- 'emails' => array('email@gmail.com'),
- /*'categories' => 'exception.*, system.*',*/
- 'except' => 'exception.CHttpException.404', // игнорим 404
- 'sentFrom' => 'noreply@tltdgkh.ru',
- 'subject' => 'Error',
- 'config' => array(
- 'SMTP',
- 'Host' => "smtp.gmail.com",
- 'SMTPAuth' => true, // enable SMTP authentication
- 'SMTPSecure' => "ssl", // sets the prefix to the server
- // Attention: Remember to enable the SSL module in PHP
- 'Port' => 465, // set the SMTP port for the GMAIL server
- 'Username' => "email@gmail.com", // GMAIL username
- 'Password' => "", // GMAIL password
- 'CharSet' => "UTF-8",
- )
- ),
- // uncomment the following to show log messages on web pages
- /*
- array(
- 'class'=>'CWebLogRoute',
- ),
- */
- ),
- ),
- 'mailer' => array(
- 'class' => 'application.extensions.mailer.EMailer',
- 'pathViews' => 'application.views.email',
- 'pathLayouts' => 'application.views.email.layouts'
- ),
- ),
- // application-level parameters that can be accessed
- // using Yii::app()->params['paramName']
- 'params'=>array(
- // this is used in contact page
- 'adminEmail'=>'email@gmail.com',
- 'countersEmail' => 'robaweb@gmail.com', // почта для отправки показаний
- 'mailer' => array (
- 'Mailer' => 'smtp',
- 'ContentType' => 'text/html',
- 'SMTPAuth' => true,
- 'SMTPSecure' => 'ssl',
- 'CharSet' => 'UTF-8',
- 'Timeout' => 15,
- 'Host' => 'smtp.gmail.com',
- 'Port' => 465,
- 'Username' => 'email@gmail.com',
- 'Password' => '',
- )
- ),
- );
- if (isset($developConfig)) {
- $result = array_merge_recursive_distinct($result, $developConfig);
- }
- if (isset($productionConfig)) {
- $result = array_merge_recursive_distinct($result, $productionConfig);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement