View Single Post
Old 09-06-2013, 12:26 AM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,269
Wow, interesting stuff you stumble on in reddit:

Quote:
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)

/home/reddit/www/public/reddit/framework/db/CDbConnection.php(381)

369 throw new CDbException('CDbConnection.connectionString cannot be empty.');
370 try
371 {
372 Yii::trace('Opening DB connection','system.db.CDbConnection');
373 $this->_pdo=$this->createPdoInstance();
374 $this->initConnection($this->_pdo);
375 $this->_active=true;
376 }
377 catch(PDOException $e)
378 {
379 if(YII_DEBUG)
380 {
381 throw new CDbException('CDbConnection failed to open the DB connection: '.
382 $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
383 }
384 else
385 {
386 Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbE xception');
387 throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
388 }
389 }
390 }
391 }
392
393 /**
Stack Trace
#0
+ /home/reddit/www/public/reddit/framework/db/CDbConnection.php(330): CDbConnection->open()
#1
+ /home/reddit/www/public/reddit/framework/db/CDbConnection.php(308): CDbConnection->setActive(true)
#2
+ /home/reddit/www/public/reddit/framework/base/CModule.php(387): CDbConnection->init()
#3
+ /home/reddit/www/public/reddit/framework/base/CApplication.php(444): CModule->getComponent("db")
#4
+ /home/reddit/www/public/reddit/framework/db/ar/CActiveRecord.php(623): CApplication->getDb()
#5
+ /home/reddit/www/public/reddit/framework/db/ar/CActiveRecord.php(2309): CActiveRecord->getDbConnection()
#6
+ /home/reddit/www/public/reddit/framework/db/ar/CActiveRecord.php(387): CActiveRecordMetaData->__construct(Subreddits)
#7
+ /home/reddit/www/public/reddit/framework/web/CActiveDataProvider.php(74): CActiveRecord::model("Subreddits")
#8
? /home/reddit/www/public/reddit/protected/controllers/SiteController.php(87): CActiveDataProvider->__construct("Subreddits", array("criteria" => CDbCriteria, "pagination" => array("pageSize" => "125")))
82 'criteria' => $crit1,
83 'pagination' => array(
84 'pageSize' => '125'
85 )
86
87 ));
88 $subscribers = new CActiveDataProvider('Subreddits', array(
89 'criteria' => $crit2,
90 'pagination' => array(
91 'pageSize' => '125'
92 )
#9
? /home/reddit/www/public/reddit/protected/controllers/SiteController.php(40): SiteController->actionIndex(true, "1")
35
36 }
37
38
39 public function actionNsfw($Subreddits_page = 1) {
40 $this->actionIndex(true, $Subreddits_page);
41 }
42
43 public function actionIndex($nsfw = false, $Subreddits_page = 1) {
44
45 $page = $Subreddits_page-1;
#10
unknown(0): SiteController->actionNsfw("1")
#11
+ /home/reddit/www/public/reddit/framework/web/actions/CAction.php(108): ReflectionMethod->invokeArgs(SiteController, array("1"))
#12
+ /home/reddit/www/public/reddit/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(SiteController, ReflectionMethod, array("Subreddits_page" => "1"))
#13
+ /home/reddit/www/public/reddit/framework/web/CController.php(308): CInlineAction->runWithParams(array("Subreddits_page" => "1"))
#14
+ /home/reddit/www/public/reddit/framework/web/CController.php(286): CController->runAction(CInlineAction)
#15
+ /home/reddit/www/public/reddit/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array())
#16
+ /home/reddit/www/public/reddit/framework/web/CWebApplication.php(282): CController->run("nsfw")
#17
+ /home/reddit/www/public/reddit/framework/web/CWebApplication.php(141): CWebApplication->runController("site/nsfw")
#18
+ /home/reddit/www/public/reddit/framework/base/CApplication.php(175): CWebApplication->processRequest()
#19
? /home/reddit/www/public/reddit/index.php(14): CApplication->run()
09 defined('YII_DEBUG') or define('YII_DEBUG',true);
10 // specify how many levels of call stack should be shown in each log message
11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
12
13 require_once($yii);
14 Yii::createWebApplication($config)->run();
15 ?>
Very professional of them to let the errors show through, ya know?
sarettah is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote