Benim kullanmakta olduğum bir sohbet sistemi var. Sistemdeki bazı kusurları giderebildim fakat bir kusuru var ki bir türlü halledemedim.
Aşağıda DB.php kodlarını sizinle paylaşıyorum arkadaşlar, sizden ricam 39 ve 69 satırdaki kodlara bir bakmanız. Sorunu aşağıda kısaca özetledim.
SORUN
Sistemde online olan kullanıcı sistemden çıksa bile (çıkış yap veyahut siteyi kapatma) çok uzun süre hala online gözüküyor.
Hatta sürekli online gözüküyor diyebilirim. Bu kodlar ile alakası var mı süreyi nasıl ayarlayabilirim?
Yardımcı olursanız çok memnun olurum.
<?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.
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'XXX',
// Default app lang
'language'=>'tr',
'defaultController' => 'Videochat',
// preloading 'log' component
'preload'=>array('log'),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
),
// application components
'components'=>array(
'user'=>array(
'allowAutoLogin'=>false,
'loginUrl' => array('videochat/login'),
'returnUrl' => array('videochat/index'),
),
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=tas_sohbet',
'emulatePrepare' => true,
'username' => 'tas_goruntu',
'password' => '++',
'charset' => 'utf8',
'tablePrefix' => 'vc_',
'schemaCachingDuration' => 60 * 60 * 24 * 30,
'enableParamLogging' => false,
'enableProfiling' => false,
),
'cache'=>array(
'class'=>'CFileCache',
),
/*'errorHandler'=>array(
// use 'site/error' action to display errors
'errorAction'=>'site/error',
),*/
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
//'levels'=>'trace, info',
),
// uncomment the following to show log messages on web pages
/*array(
'class'=>'CWebLogRoute',
),*/
),
),
),
// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
'params'=>array(
'tokenTime' => time() + 60 * 60 * 1,
'clearKey' => false,
'default_timezone' => 'Europe/Istanbul', // http://www.php.net/manual/en/timezones.php
'sessIntTime' => 50 * 1000, // Milliseconds 50 * 1000 ms == 50 sec
'dataSync' => 5 * 1000, // Milliseconds. Informer and online users
'chatActivity' => array(
// NoActivity => Time between requests
0 => 1 * 1000,
3 => 2 * 1000,
10 => 5 * 1000,
20 => 15 * 1000,
30 => 30 * 1000,
),
),
);