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/WfThemeAction.php(108): CActiveRecord::model("Node")
103     if($this->layout!==null) 
104         $controller->layout=$layout;  
105   }
106   protected function createQuery($modelClass)
107   {
108     $query=is_object($modelClass)?$modelClass:CActiveRecord::model($modelClass);
109     if (isset($this->filter))
110         $query->getDbCriteria()->mergeWith($this->filter);
111     if(isset($this->scopes))
112         WfHelper::applyScopes($query,$this->scopes);
113     return $query;
#10
+
 /home/wwwroot/www.sh17.com/protected/modules/wfbase/node/WfBaseNodeViewAction.php(7): WfThemeAction->createQuery("Node")
2 class WfBaseNodeViewAction extends WfThemeAction{
3   public $nodeClass;
4   public function getQuery()
5   {
6      $nodeClass=Yii::import(isset($this->nodeClass)?$this->nodeClass:$this->getController()->getNodeHelper()->nodeClass);
7     return $this->createQuery($nodeClass);
8   }
9 }
#11
+
 /home/wwwroot/www.sh17.com/protected/modules/wfbase/components/WfNodeCatalogAction.php(41): WfBaseNodeViewAction->getQuery()
36   public function runAction()
37   {
38     $id=$this->getIdValue();
39     WfHelper::notFoundIf(!isset($id));
40     WfHelper::notFoundIf(isset($this->idList) and !in_array($id,$this->idList));
41     $query=$this->getQuery();
42     $list=$this->getListModel($query)->byid($id,$this->paramType)->find();
43     $this->validateType($list);    
44     WfHelper::notFoundIf(!isset($list));    
45     $this->filterNodes($query,$list);    
46     $this->prepareList($list);
2024-03-28 23:49:17 nginx/1.6.0 Yii Framework/1.1.12