Error Info: Array( [0] => HY000 [1] => 2006 [2] => MySQL server has gone away)
in /var/www/html/vendor/yiisoft/yii2/db/Command.php at line 1258
$exceptionClass = '\yii\db\Exception'; foreach ($this->exceptionMap as $error => $class) { if (strpos($e->getMessage(), $error) !== false) { $exceptionClass = $class; } } $message = $e->getMessage() . "\nThe SQL being executed was: $rawSql"; $errorInfo = $e instanceof \PDOException ? $e->errorInfo : null; return new $exceptionClass($message, $errorInfo, (int) $e->getCode(), $e); } /** * Returns a value indicating whether a SQL statement is for read purpose. * @param string $sql the SQL statement * @return bool whether a SQL statement is for read purpose. */ public function isReadQuery($sql) {
} else { $this->pdoStatement->execute(); } break; } catch (\Exception $e) { $rawSql = $rawSql ?: $this->getRawSql(); $e = $this->db->getSchema()->convertException($e, $rawSql); if ($this->_retryHandler === null || !call_user_func($this->_retryHandler, $e, $attempt)) { throw $e; } } } }
$this->prepare(true); try { $profile and Yii::beginProfile($rawSql, 'yii\db\Command::query'); $this->internalExecute($rawSql); if ($method === '') { $result = new DataReader($this); } else { if ($fetchMode === null) { $fetchMode = $this->fetchMode;
* @return array|false the first row (in terms of an array) of the query result. False is returned if the query * results in nothing. * @throws Exception execution failed */ public function queryOne($fetchMode = null) { return $this->queryInternal('fetch', $fetchMode); } /** * Executes the SQL statement and returns the value of the first column in the first row of data. * This method is best used when only a single value is needed for a query. * @return string|null|false the value of the first column in the first row of the query result.
public function one($db = null) { if ($this->emulateExecution) { return false; } return $this->createCommand($db)->queryOne(); } /** * Returns the query result as a scalar value. * The value returned will be the first column in the first row of the query results. * @param Connection $db the database connection used to generate the SQL statement.
* @return ActiveRecord|array|null a single row of query result. Depending on the setting of [[asArray]], * the query result may be either an array or an ActiveRecord object. `null` will be returned * if the query results in nothing. */ public function one($db = null) { $row = parent::one($db); if ($row !== false) { $models = $this->populate([$row]); return reset($models) ?: null; } return null;
$request = Yii::$app->request; $params = Yii::$app->request->get(); $model = ContentsModel::find() ->select(Yii::$app->params['select_collumn_full'] . ',users.name as author,users.avatar as avatar, contents.showdate, contents.modify_by, contents.created_by') ->leftJoin(Yii::$app->params['page_table'], Yii::$app->params['contents_left_join_condition']) ->leftJoin(Yii::$app->params['users_table'], Yii::$app->params['users_left_join_condition']) ->where(['`contents`.published' => 1, '`contents`.id' => $request->get('entity_id', 0)])->asArray()->one(); if(isset($model['catid'])) { $category = CategoryModel::find() ->select(Yii::$app->params['category_collumn']) ->leftJoin(Yii::$app->params['page_table'], Yii::$app->params['category_left_join_condition']) ->where(['categories.id' => $model['catid']])->asArray()->one(); }
$this->_detectMobile(); if (FpUtil::isCache() && ! Yii::$app->params['force_cache_renew']) { Yii::$app->htmlcache->loadFromCache($this, $action); } $this->seoMeta(); $this->_setErrorMeta($action); //$this->_setAjaxUrl(); return parent::beforeAction($action); } public function afterAction($action, $result)
break; } } $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); if ($oldController !== null) { Yii::$app->controller = $oldController; } return $result; }
$params = $this->catchAll; unset($params[0]); } try { Yii::debug("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } $response = $this->getResponse(); if ($result !== null) {
{ try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
//$config['components']['cache']['servers'][0]['host'] = '10.100.100.36'; $config['components']['db']['dsn'] = 'mysql:host=localhost;dbname=beta_kts;port=3306'; $config['components']['db']['username'] = 'root'; $config['components']['db']['password'] = 'root';} (new yii\web\Application($config))->run();
$_GET = [ 'id' => '96', 'url' => 'diem-chuan-dai-hoc', 'titlerobot' => 'Tra cứu Điểm chuẩn Đại học 2023, 2022 & năm trước đó', 'ogtitle' => 'TRA CỨU ĐIỂM CHUẨN ĐẠI HỌC 2023, 2022', 'metades' => 'Điểm chuẩn sẽ được công bố trước 17h ngày 22/8. Bộ Giáo dục và Đào tạo và các trường bắt đầu quy trình xét tuyển và xử lý nguyện vọng đại học từ ngày 12 đến 20/8, qua đó xác định nguyện vọng cao nhất thí sinh trúng tuyển.', 'metakey' => 'điểm chuẩn, điểm chuẩn đại học, điểm chuẩn đại học 2020, tra điểm chuẩn, điểm chuẩn đại học 2020, điểm chuẩn đại học 2020, điểm chuẩn đại học 2020', 'metarobot' => 'index, follow', 'canonical' => '', 'app' => 'content', 'view' => 'catecontent', 'entity_type' => 'categories', 'entity_id' => '295', 'css' => '', 'js' => '', 'num_views' => '0', 'num_comments' => '0', 'num_liked' => '0', 'ads' => null, 'slug' => 'diem-chuan-dai-hoc', 'uni_id' => 157, 'sub_slug' => 'truong-si-quan-luc-quan-1-dai-hoc-tran-quoc-tuan-u-157',];$_SESSION = [ '__flash' => [],];