CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] No such file or directory

/var/www/nadezhda48.ru/data/private/framework/db/CDbConnection.php(382)

370                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
371             try
372             {
373                 Yii::trace('Opening DB connection','system.db.CDbConnection');
374                 $this->_pdo=$this->createPdoInstance();
375                 $this->initConnection($this->_pdo);
376                 $this->_active=true;
377             }
378             catch(PDOException $e)
379             {
380                 if(YII_DEBUG)
381                 {
382                     throw new CDbException('CDbConnection failed to open the DB connection: '.
383                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
384                 }
385                 else
386                 {
387                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
388                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
389                 }
390             }
391         }
392     }
393 
394     /**

Stack Trace

#8
+
 /var/www/nadezhda48.ru/data/www/xn--48-6kcatagi3d.xn--p1ai/protected/modules/pages/models/Pages.php(214): CActiveRecord->__call("findByPath", array("iblock/news/bezopasnoe_detstvo"))
209 
210 
211     /** Refactoring **/
212     static public function routeUrl($uri, $forMenu=false)
213     {
214         $page = Pages::model()->findByPath($uri);
215         if($page == null) return false;
216 
217         if($forMenu){
218             return (int) $page->id;
219         }else{
#9
+
 /var/www/nadezhda48.ru/data/www/xn--48-6kcatagi3d.xn--p1ai/protected/modules/pages/models/Pages.php(214): Pages->findByPath("iblock/news/bezopasnoe_detstvo")
209 
210 
211     /** Refactoring **/
212     static public function routeUrl($uri, $forMenu=false)
213     {
214         $page = Pages::model()->findByPath($uri);
215         if($page == null) return false;
216 
217         if($forMenu){
218             return (int) $page->id;
219         }else{
#10
+
 /var/www/nadezhda48.ru/data/www/xn--48-6kcatagi3d.xn--p1ai/protected/components/PageUrlRule.php(22): Pages::routeUrl("iblock/news/bezopasnoe_detstvo")
17         }
18         return false; //наше правило не подходит, передаем другому правилу
19     }
20     
21     public function parseUrl($manager, $request, $pathInfo, $rawPathInfo){ 
22         $pageRoute = Pages::routeUrl($pathInfo);
23         
24             return $pageRoute;
25         
26     }
27     
2024-04-18 20:04:06 Apache/2.4.38 (Debian) Yii Framework/1.1.15