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/WfNodeAction.php(17): WfBaseNodeViewAction->getQuery()
12   public function runAction()
13   {
14     $id=$this->getIdValue();
15     WfHelper::notFoundIf(!isset($id));
16     WfHelper::notFoundIf(isset($this->idList) and !in_array($id,$this->idList));    
17     $query=$this->getQuery()->byid($id,$this->paramType);
18     if (isset($this->type)){$query=$query->byType($this->type);}
19     if (isset($this->catalog)){$query=$query->byCatalog($this->catalog);}
20     $model=$query->find();
21     WfHelper::notFoundIf(!isset($model));
22     $this->getPagePreparer()->prepareNode($model);
2024-03-29 07:32:10 nginx/1.6.0 Yii Framework/1.1.12