in /var/www/sintret.com/web/vendor/yiisoft/yii2/db/Connection.php at line 579
$token = 'Opening DB connection: ' . $this->dsn; try { Yii::info($token, __METHOD__); Yii::beginProfile($token, __METHOD__); $this->pdo = $this->createPdoInstance(); $this->initConnection(); Yii::endProfile($token, __METHOD__); } catch (\PDOException $e) { Yii::endProfile($token, __METHOD__); throw new Exception($e->getMessage(), $e->errorInfo, (int) $e->getCode(), $e); } } /** * Closes the currently active DB connection. * It does nothing if the connection is already closed. */ public function close() {
* Returns the PDO instance for the currently active master connection. * This method will open the master DB connection and then return [[pdo]]. * @return PDO the PDO instance for the currently active master connection. */ public function getMasterPdo() { $this->open(); return $this->pdo; } /** * Returns the currently active slave connection. * If this method is called the first time, it will try to open a slave connection when [[enableSlaves]] is true.
* is available and `$fallbackToMaster` is false. */ public function getSlavePdo($fallbackToMaster = true) { $db = $this->getSlave(false); if ($db === null) { return $fallbackToMaster ? $this->getMasterPdo() : null; } else { return $db->pdo; } } /**
public function quoteValue($str) { if (!is_string($str)) { return $str; } if (($value = $this->db->getSlavePdo()->quote($str)) !== false) { return $value; } else { // the driver doesn't support quote (e.g. oci) return "'" . addcslashes(str_replace("'", "''", $str), "\000\n\r\\\032") . "'"; } }
* @param string $value string to be quoted * @return string the properly quoted string * @see http://www.php.net/manual/en/function.PDO-quote.php */ public function quoteValue($value) { return $this->getSchema()->quoteValue($value); } /** * Quotes a table name for use in a query. * If the table name contains schema prefix, the prefix will also be properly quoted. * If the table name is already quoted or contains special characters including '(', '[[' and '{{',
$params = []; foreach ($this->params as $name => $value) { if (is_string($name) && strncmp(':', $name, 1)) { $name = ':' . $name; } if (is_string($value)) { $params[$name] = $this->db->quoteValue($value); } elseif (is_bool($value)) { $params[$name] = ($value ? 'TRUE' : 'FALSE'); } elseif ($value === null) { $params[$name] = 'NULL'; } elseif (!is_object($value) && !is_resource($value)) { $params[$name] = $value;
* @return mixed the method execution result * @throws Exception if the query causes any problem * @since 2.0.1 this method is protected (was private before). */ protected function queryInternal($method, $fetchMode = null) { $rawSql = $this->getRawSql(); Yii::info($rawSql, 'yii\db\Command::query'); if ($method !== '') { $info = $this->db->getQueryCacheInfo($this->queryCacheDuration, $this->queryCacheDependency); if (is_array($info)) {
* @return string|null|boolean the value of the first column in the first row of the query result. * False is returned if there is no value. * @throws Exception execution failed */ public function queryScalar() { $result = $this->queryInternal('fetchColumn', 0); if (is_resource($result) && get_resource_type($result) === 'stream') { return stream_get_contents($result); } else { return $result; } }
* If this parameter is not given, the `db` application component will be used. * @return string|boolean the value of the first column in the first row of the query result. * False is returned if the query result is empty. */ public function scalar($db = null) { return $this->createCommand($db)->queryScalar(); } /** * Executes the query and returns the first column of the result. * @param Connection $db the database connection used to generate the SQL statement. * If this parameter is not given, the `db` application component will be used.
if (isset($this->readCallback)) { $fields = $query->one($this->db); return $fields === false ? '' : $this->extractData($fields); } $data = $query->select(['data'])->scalar($this->db); return $data === false ? '' : $data; } /** * Session write handler. * Do not call this method directly.
} $this->registerSessionHandler(); $this->setCookieParamsInternal(); @session_start(); if ($this->getIsActive()) { Yii::info('Session started', __METHOD__); $this->updateFlashCounters(); } else { $error = error_get_last();
* @param string $key the session variable name * @param mixed $defaultValue the default value to be returned when the session variable does not exist. * @return mixed the session variable value, or $defaultValue if the session variable does not exist. */ public function get($key, $defaultValue = null) { $this->open(); return isset($_SESSION[$key]) ? $_SESSION[$key] : $defaultValue; } /** * Adds a session variable. * If the specified name already exists, the old value will be overwritten.
* @see hasFlash() * @see getAllFlashes() * @see removeFlash() */ public function getFlash($key, $defaultValue = null, $delete = false) { $counters = $this->get($this->flashParam, []); if (isset($counters[$key])) { $value = $this->get($key, $defaultValue); if ($delete) { $this->removeFlash($key); } elseif ($counters[$key] < 0) { // mark for deletion in the next request
* Returns a value indicating whether there are flash messages associated with the specified key. * @param string $key key identifying the flash message type * @return boolean whether any flash messages exist under specified key */ public function hasFlash($key) { return $this->getFlash($key) !== null; } /** * This method is required by the interface [[\ArrayAccess]]. * @param mixed $offset the offset to check on * @return boolean
</div> </header> <?php if (Yii::$app->util->beforeBody) echo Yii::$app->util->beforeBody; ?> <div class="container"> <?php if (Yii::$app->session->hasFlash('success')): ?> <div class="alert alert-success"> <?php echo Yii::$app->session->getFlash('success'); ?> </div> <?php elseif (Yii::$app->session->hasFlash('error')): ?> <div class="alert alert-danger"> <?php echo Yii::$app->session->getFlash('error'); ?>
*/ public function renderPhpFile($_file_, $_params_ = []) { ob_start(); ob_implicit_flush(false); extract($_params_, EXTR_OVERWRITE); require($_file_); return ob_get_clean(); } /** * Renders dynamic content returned by the given PHP statements.
$this->renderers[$ext] = Yii::createObject($this->renderers[$ext]); } /* @var $renderer ViewRenderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); } else { $output = $this->renderPhpFile($viewFile, $params); } $this->afterRender($viewFile, $params, $output); } array_pop($this->_viewFiles); $this->context = $oldContext;
* @since 2.0.1 */ public function renderContent($content) { $layoutFile = $this->findLayoutFile($this->getView()); if ($layoutFile !== false) { return $this->getView()->renderFile($layoutFile, ['content' => $content], $this); } else { return $content; } } /**
* @return string the rendering result. * @throws InvalidParamException if the view file or the layout file does not exist. */ public function render($view, $params = []) { $content = $this->getView()->render($view, $params, $this); return $this->renderContent($content); } /** * Renders a static string by applying a layout. * @param string $content the static string being rendered * @return string the rendering result of the layout with the given static string as the `$content` variable.
'models' => $models, ]); } public function actionTools() { return $this->render('tools2'); } public function actionMe() { return $this->render('me'); }
$args = $this->controller->bindActionParams($this, $params); Yii::trace('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
$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); Yii::$app->controller = $oldController; return $result; } else { $id = $this->getUniqueId(); throw new InvalidRouteException('Unable to resolve the request "' . ($id === '' ? $route : $id . '/' . $route) . '".');
$params = $this->catchAll; unset($params[0]); } try { Yii::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } else { $response = $this->getResponse(); if ($result !== null) { $response->data = $result;
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();
require(__DIR__ . '/../../common/config/main-local.php'), require(__DIR__ . '/../config/main.php'), require(__DIR__ . '/../config/main-local.php') ); $application = new yii\web\Application($config); $application->run();
$_SERVER = [ 'USER' => 'ispconfig', 'HOME' => '/usr/local/ispconfig', 'HTTP_USER_AGENT' => 'claudebot', 'HTTP_ACCEPT' => '*/*', 'HTTP_HOST' => 'sintret.com', 'SCRIPT_FILENAME' => '/var/www/sintret.com/web/frontend/web/index.php', 'REDIRECT_STATUS' => '200', 'SERVER_NAME' => 'sintret.com', 'SERVER_PORT' => '443', 'SERVER_ADDR' => '206.189.94.166', 'REMOTE_PORT' => '60544', 'REMOTE_ADDR' => '3.85.63.190', 'SERVER_SOFTWARE' => 'nginx/1.10.3', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'HTTPS' => 'on', 'REQUEST_SCHEME' => 'https', 'SERVER_PROTOCOL' => 'HTTP/2.0', 'DOCUMENT_ROOT' => '/var/www/sintret.com/web', 'DOCUMENT_URI' => '/frontend/web/index.php', 'REQUEST_URI' => '/tools', 'SCRIPT_NAME' => '/frontend/web/index.php', 'CONTENT_LENGTH' => '', 'CONTENT_TYPE' => '', 'REQUEST_METHOD' => 'GET', 'QUERY_STRING' => '', 'FCGI_ROLE' => 'RESPONDER', 'PHP_SELF' => '/frontend/web/index.php', 'REQUEST_TIME_FLOAT' => 1710820176.5638959, 'REQUEST_TIME' => 1710820176, ];