CÁC CHỈ TIÊU ĐÁNH GIÁ MỨC ĐỘ ĂN MÒN KIM LOẠI

CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

/var/www/html/common/classs/ClaSite.php(256)

244 } 245 246 /** 247 * Get domain info 248 * @param type $domain 249 * @return array 250 */ 251 public static function getDomainInfo($domain = null) { 252 if (!$domain) 253 $domain = self::getServerName(); 254 $domaininfo = Yii::app()->cache->get(self::CACHE_DOMAIN_PRE . $domain); 255 if (!$domaininfo) { 256 $domaininfo = Yii::app()->db->createCommand()->select('*')->from(ClaTable::getTable('domain')) 257 ->where('domain_id=:domain_id', array(':domain_id' => $domain)) 258 ->queryRow(); 259 if ($domaininfo) 260 Yii::app()->cache->set('domain_' . $domain, $domaininfo); 261 } 262 return $domaininfo; 263 } 264 265 /** 266 * Get site id from domain 267 * @param type $domain 268 */

Stack Trace

#0 + – /var/www/html/common/lib/yii-framework-1.1.15/yii.php(8399): CDbConnection->open() 8394 public function setActive($value) 8395 { 8396 if($value!=$this->_active) 8397 { 8398 if($value) 8399 $this->open(); 8400 else 8401 $this->close(); 8402 } 8403 } 8404 public function cache($duration, $dependency=null, $queryCount=1)
#1 + – /var/www/html/common/lib/yii-framework-1.1.15/yii.php(8388): CDbConnection->setActive(true) 8383 } 8384 public function init() 8385 { 8386 parent::init(); 8387 if($this->autoConnect) 8388 $this->setActive(true); 8389 } 8390 public function getActive() 8391 { 8392 return $this->_active; 8393 }
#2 + – /var/www/html/common/lib/yii-framework-1.1.15/yii.php(1060): CDbConnection->init() 1055 $config=$this->_componentConfig[$id]; 1056 if(!isset($config['enabled']) || $config['enabled']) 1057 { 1058 unset($config['enabled']); 1059 $component=Yii::createComponent($config); 1060 $component->init(); 1061 return $this->_components[$id]=$component; 1062 } 1063 } 1064 } 1065 public function setComponent($id,$component,$merge=true)
#3 + – /var/www/html/common/lib/yii-framework-1.1.15/yii.php(915): CModule->getComponent("db") 910 $this->init(); 911 } 912 public function __get($name) 913 { 914 if($this->hasComponent($name)) 915 return $this->getComponent($name); 916 else 917 return parent::__get($name); 918 } 919 public function __isset($name) 920 {
#4 + – /var/www/html/common/classs/ClaSite.php(256): CModule->__get("db") 251 public static function getDomainInfo($domain = null) { 252 if (!$domain) 253 $domain = self::getServerName(); 254 $domaininfo = Yii::app()->cache->get(self::CACHE_DOMAIN_PRE . $domain); 255 if (!$domaininfo) { 256 $domaininfo = Yii::app()->db->createCommand()->select('*')->from(ClaTable::getTable('domain')) 257 ->where('domain_id=:domain_id', array(':domain_id' => $domain)) 258 ->queryRow(); 259 if ($domaininfo) 260 Yii::app()->cache->set('domain_' . $domain, $domaininfo); 261 }
#5 + – /var/www/html/common/classs/ClaSite.php(270): ClaSite::getDomainInfo(null) 265 /** 266 * Get site id from domain 267 * @param type $domain 268 */ 269 public static function getSiteIdFromDomain($domain = null) { 270 $domaininfo = self::getDomainInfo($domain); 271 if (!$domaininfo) 272 return 0; 273 return $domaininfo['site_id']; 274 } 275
#6 + – /var/www/html/common/classs/ClaSite.php(290): ClaSite::getSiteIdFromDomain() 285 * @param type $site_id 286 */ 287 public static function getSiteInfo($site_id = 0) { 288 $site_id = (int) $site_id; 289 if (!$site_id) 290 $site_id = self::getSiteIdFromDomain(); 291 if ($site_id) { 292 // 293 $translate_language = self::getLanguageTranslate(); 294 // 295 //Yii::app()->cache->delete(self::CACHE_SITEINFO_PRE . $site_id . $translate_language);
#7 + – /var/www/html/protected/components/PublicWebApplication.php(32): ClaSite::getSiteInfo() 27 $this->db->setActive(true); 28 $this->isDemo = true; 29 // 30 Yii::app()->cache->keyPrefix = 'demo'; 31 } 32 $this->siteinfo = ClaSite::getSiteInfo(); 33 if (!$this->siteinfo || !count($this->siteinfo)) 34 Yii::app()->end(); 35 if (!isset($this->siteinfo['site_id'])) 36 die(Yii::t('common', 'pagenotfound')); 37 if ($this->siteinfo['site_title'])
#8 + – /var/www/html/common/lib/yii-framework-1.1.15/yii.php(1184): PublicWebApplication->init() 1179 $this->initSystemHandlers(); 1180 $this->registerCoreComponents(); 1181 $this->configure($config); 1182 $this->attachBehaviors($this->behaviors); 1183 $this->preloadComponents(); 1184 $this->init(); 1185 } 1186 public function run() 1187 { 1188 if($this->hasEventHandler('onBeginRequest')) 1189 $this->onBeginRequest(new CEvent($this));
#9 + – /var/www/html/common/lib/yii-framework-1.1.15/yii.php(55): CApplication->__construct("/var/www/html/protected/config/main.php") 50 { 51 return self::createApplication('CConsoleApplication',$config); 52 } 53 public static function createApplication($class,$config=null) 54 { 55 return new $class($config); 56 } 57 public static function app() 58 { 59 return self::$_app; 60 }
#10 + – /var/www/html/index.php(21): YiiBase::createApplication("PublicWebApplication", "/var/www/html/protected/config/main.php") 16 require_once($yii); 17 require_once('common/components/WebApplication.php'); 18 require_once('common/lib/global.php'); 19 require_once('protected/components/PublicWebApplication.php'); 20 21 $app = Yii::createApplication('PublicWebApplication', $config); 22 $app->run(); 23 //Yii::createWebApplication($config); 24 //Yii::app()->run();
2024-11-25 16:43:24 Apache/2.4.7 (Ubuntu) Yii Framework/1.1.15

Từ khóa » Tốc độ ăn Mòn Là Gì