CDbException

CDbCommand не удалось исполнить SQL-запрос: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lk_usoft_ru.AuthItem' doesn't exist. The SQL statement executed was: SELECT *
FROM `AuthItem`
WHERE name=:name

/var/www/hosts/framework/db/CDbCommand.php(548)

536         {
537             if($this->_connection->enableProfiling)
538                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
539 
540             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
541             $message=$e->getMessage();
542             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
543                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
544 
545             if(YII_DEBUG)
546                 $message.='. The SQL statement executed was: '.$this->getText().$par;
547 
548             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
549                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
550         }
551     }
552 
553     /**
554      * Builds a SQL SELECT statement from the given query specification.
555      * @param array $query the query specification in name-value pairs. The following
556      * query options are supported: {@link select}, {@link distinct}, {@link from},
557      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
558      * {@link limit}, {@link offset} and {@link union}.
559      * @throws CDbException if "from" key is not present in given query parameter
560      * @return string the SQL statement

Stack Trace

#5
+
 /var/www/hosts/lk.usoft.ru/protected/modules/news/models/News.php(637): CWebUser->checkAccess()
632 
633     /**
634      * запись просмотров сторонними пользователями
635      */
636     public function countView(){
637         if($_SERVER['REMOTE_ADDR'] != '89.175.162.243' && $_SERVER['REMOTE_ADDR'] != '95.142.37.145' && !Yii::app()->user->checkAccess('manager')) {
638             // views
639             $this->saveAttributes(array('pageviews' =>($this->pageviews + 1)));
640         }
641 
642     }
#6
+
 /var/www/hosts/lk.usoft.ru/protected/modules/news/controllers/NewsController.php(89): News->countView()
84         $companyNews = CompanyNews::model()->findByAttributes(['outer_id' => $model->id]);
85         $widgets = $this->getWidgets((int)$companyNews->category_id);
86 
87         ContentView::addView(self::CATEGORY_ID, $id);
88         TagStatQueue::addTagsStat($model);
89         $model->countView();
90         $userTagsList = [];
91 
92         if (!Yii::app()->user->isGuest) {
93             $userBaseId = Yii::app()->getModule('user')->user()->profile->base_id;
94             $userTagsList = TagSubscribe::model()->getTagListForUser($userBaseId);
#16
+
 /var/www/hosts/lk.usoft.ru/index.php(58): CApplication->run()
53 //Yii::setPathOfAlias('templates', $dirname_file .DIRECTORY_SEPARATOR.'templates');
54 Yii::setPathOfAlias('core',INDEX_DIR.DIRECTORY_SEPARATOR.'core');
55 require_once(__DIR__.DIRECTORY_SEPARATOR.'protected' .DIRECTORY_SEPARATOR.'vendors' .DIRECTORY_SEPARATOR.'Loader.php');
56 Yii::registerAutoloader(array('Loader','systemMainAutoload'));
57 
58 Yii::createWebApplication($config_yii_path)->run();
2025-10-13 10:22:32 nginx/1.18.0 Yii Framework/1.1.15