Error Info: Array ( [0] => HY000 [1] => 1114 [2] => The table 'anonim_user' is full )
in /var/www/teachs_ru_usr/data/www/teachs.ru/vendor/yiisoft/yii2/db/Command.php at line 1302
$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, $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(false); try { $profile and Yii::beginProfile($rawSql, __METHOD__); $this->internalExecute($rawSql); $n = $this->pdoStatement->rowCount(); $profile and Yii::endProfile($rawSql, __METHOD__); $this->refreshTableSchema();
* @return array|false primary key values or false if the command fails * @since 2.0.4 */ public function insert($table, $columns) { $command = $this->db->createCommand()->insert($table, $columns); if (!$command->execute()) { return false; } $tableSchema = $this->getTableSchema($table); $result = []; foreach ($tableSchema->primaryKey as $name) { if ($tableSchema->columns[$name]->autoIncrement) {
protected function insertInternal($attributes = null) { if (!$this->beforeSave(true)) { return false; } $values = $this->getDirtyAttributes($attributes); if (($primaryKeys = static::getDb()->schema->insert(static::tableName(), $values)) === false) { return false; } foreach ($primaryKeys as $name => $value) { $id = static::getTableSchema()->columns[$name]->phpTypecast($value); $this->setAttribute($name, $id); $values[$name] = $id;
if ($runValidation && !$this->validate($attributes)) { Yii::info('Model not inserted due to validation error.', __METHOD__); return false; } if (!$this->isTransactional(self::OP_INSERT)) { return $this->insertInternal($attributes); } $transaction = static::getDb()->beginTransaction(); try { $result = $this->insertInternal($attributes); if ($result === false) {
* meaning all attributes that are loaded from DB will be saved. * @return bool whether the saving succeeded (i.e. no validation errors occurred). */ public function save($runValidation = true, $attributeNames = null) { if ($this->getIsNewRecord()) { return $this->insert($runValidation, $attributeNames); } return $this->update($runValidation, $attributeNames) !== false; } /**
$newAnonimUser->last_activity_time=new \yii\db\Expression('NOW()'); $newAnonimUser->create_time=new \yii\db\Expression('NOW()'); $newAnonimUser->ip_address=Yii::$app->getRequest()->getUserIP(); if(!\Yii::$app->user->isGuest) { $newAnonimUser->user_id= \Yii::$app->user->id; } if($newAnonimUser->save(false)) { $this->setAUCookie($newAnonimUser->token); $this->anonimUser=$newAnonimUser; } } }
$newBlockedIp->save(false); } return $this->redirect(['/site/ipblocked']); } } $this->cookieInit(); return parent::beforeAction($action); } public function cookieInit() {
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();
'class' => 'yii\debug\Module', 'allowedIPs' => ['91.196.77.20', '127.0.0.1', '212.109.221.82'] // adjust this to your needs ]; (new yii\web\Application($config))->run(); // if($_SERVER['REMOTE_ADDR']=='94.158.54.142' || $_SERVER['REMOTE_ADDR']=='127.0.0.1'){ // $application = new yii\web\Application($config); // $application->run(); // } else { // if(isset($_SERVER['REQUEST_URI'])) {
$_GET = [ 'q' => 'шитье', 'tag' => '1', ];