PHP warning

PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///tmp/mysql.sock)

/home/wwwroot/www.sh17.com/protected/framework/db/CDbConnection.php(422)

410      * @return PDO the pdo instance
411      */
412     protected function createPdoInstance()
413     {
414         $pdoClass=$this->pdoClass;
415         if(($pos=strpos($this->connectionString,':'))!==false)
416         {
417             $driver=strtolower(substr($this->connectionString,0,$pos));
418             if($driver==='mssql' || $driver==='dblib' || $driver==='sqlsrv')
419                 $pdoClass='CMssqlPdoAdapter';
420         }
421         return new $pdoClass($this->connectionString,$this->username,
422                                     $this->password,$this->_attributes);
423     }
424 
425     /**
426      * Initializes the open db connection.
427      * This method is invoked right after the db connection is established.
428      * The default implementation is to set the charset for MySQL and PostgreSQL database connections.
429      * @param PDO $pdo the PDO instance
430      */
431     protected function initConnection($pdo)
432     {
433         $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
434         if($this->emulatePrepare!==null && constant('PDO::ATTR_EMULATE_PREPARES'))

Stack Trace

#9
+
 /home/wwwroot/www.sh17.com/protected/modules/wfbase/components/WfHelper.php(131): CActiveRecord::model("Menu")
126 **/        
127     public static function nodeQuery($class=null)
128     {
129       if (!isset($class)){$class=self::getModule()->defalutNodeClass;}
130       $className=Yii::import($class);
131       $query=CActiveRecord::model($className);
132       $query->resetScope()->getModule();
133       return $query;
134     }
135         public static function nodeCatalogQuery($class=null)
136         {
#10
+
 /home/wwwroot/www.sh17.com/themes/basic/views/site/left.php(5): WfHelper::nodeQuery("Menu")
01 <?php
02 isset($_GET["id"]) ? $id = $_GET["id"] : $id = "";
03 $helper = WfHelper::getHelper('wfmenu');
04 $menuClass = $helper->getMenuClass();
05 $menu = WfHelper::nodeQuery($menuClass)->findByPk($id);
06 $menuarray = $menu->getParents();
07 $relateds = WfHelper::getHelper('wfmenu')->getAllRelateds($menu);
08 $title = '';
09 foreach($menuarray as $k=> $v){
10     if($k<=1){
#15
+
 /home/wwwroot/www.sh17.com/protected/modules/wfbase/components/WfThemeAction.php(97): CController->render("left", array("forms" => array(), "data" => null))
092         {
093       if ($this->layout===false)
094       {
095         $controller->renderPartial($viewFile,$viewData);       
096       }else{
097             $controller->render($viewFile,$viewData); 
098           }
099         }
100         $this->onAfterRender(new CEvent($this)); 
101     } 
102 
2024-03-28 19:04:25 nginx/1.6.0 Yii Framework/1.1.12