Database Exception – yii\db\Exception

发布时间:2024-12-15 21:19

1. in /www/zy.21cnjy.com/vendor/yiisoft/yii2/db/Connection.php at line 568

559560561562563564565566567568569570571572573574575576577

$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); } } public function close() {

890891892893894895896897898899900901902

* 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; }

877878879880881882883884885886887888889

* 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; } }

213214215216217218219220221222223224225

if ($this->db->getTransaction()) { $forRead = false; } if ($forRead || $forRead === null && $this->db->getSchema()->isReadQuery($sql)) { $pdo = $this->db->getSlavePdo(); } else { $pdo = $this->db->getMasterPdo(); } try { $this->pdoStatement = $pdo->prepare($sql);

890891892893894895896897898899900901902

Yii::trace('Query result served from cache', 'yii\db\Command::query'); return $result[0]; } } } $this->prepare(true); $token = $rawSql; try { Yii::beginProfile($token, 'yii\db\Command::query'); $this->pdoStatement->execute();

356357358359360361362363364365366367368

* @return array all rows of the query result. Each array element is an array representing a row of data. * An empty array is returned if the query results in nothing. * @throws Exception execution failed */ public function queryAll($fetchMode = null) { return $this->queryInternal('fetchAll', $fetchMode); }

207208209210211212213214215216217218219

*/ public function all($db = null) { if ($this->emulateExecution) { return []; } $rows = $this->createCommand($db)->queryAll(); return $this->populate($rows); }

8. in /www/zy.21cnjy.com/vendor/yiisoft/yii2/db/ActiveQuery.php at line 133 – yii\db\Query::all(null)

127128129130131132133134135136137138139

* @param Connection $db the DB connection used to create the DB command. * If null, the DB connection returned by [[modelClass]] will be used. * @return array|ActiveRecord[] the query results. If the query results in nothing, an empty array will be returned. */ public function all($db = null) { return parent::all($db); } public function prepare($builder)

268269270271272273274275276277278279280

$intro .=$val['intro']; } $res->softintro = $intro; } if (!empty($res->softintro)) { $keyword = BanedWords::find()->select(['keyword'])->asArray()->all(); $res->softintro = str_replace(array_column($keyword, 'keyword'), '',$res->softintro); } if($ret==true){ $data = Yii::createObject([ 'class' => 'yii\rest\Serializer', 'collectionEnvelope' => 'data',

10. app\controllers\SiteController::actionDetail('15910828', false)

11. in /www/zy.21cnjy.com/vendor/yiisoft/yii2/base/InlineAction.php at line 57 – call_user_func_array([app\controllers\SiteController, 'actionDetail'], ['15910828', false])

515253545556575859

$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); } }

150151152153154155156157158159160161162

} $result = null; if ($runAction && $this->beforeAction($action)) { $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); foreach ($modules as $module) {

517518519520521522523524525526527528529

$parts = $this->createController($route); if (is_array($parts)) { 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; }

14. in /www/zy.21cnjy.com/vendor/yiisoft/yii2/web/Application.php at line 102 – yii\base\Module::runAction('site/detail', ['itemid' => '15910828'])

96979899100101102103104105106107108

$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;

374375376377378379380381382383384385386

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();

9101112131415

$config = yii\helpers\ArrayHelper::merge( require(__DIR__ . '/../config/main.php'), require(__DIR__ . '/../config/main-local.php') ); $application = new yii\web\Application($config); $application->run();

$_GET = [ 'itemid' => '15910828', ]; $_COOKIE = [ 'Hm_lvt_0280ecaa2722243b1de4829d59602c72' => '1734267526', 'HMACCOUNT' => '9AA818CF0C484273', 'Hm_lvt_690f687fe07b350f535d941f6f5ecb13' => '1734267526', 'ssxmod_itna' => 'Qq xBDgQG=9UDODzxAhYoGkKWB3qWui94YDQ77DlrD3xWKGkD6DWP0WbAiIivKOW18GeqIQE82rFWAGe2b4Yp3O4DIDmFQDcxDNDGncxGXFiEAeDxx0oD5OPirsxGbkDXO50OD7MPDF/4DL98NDFqG0 gd4D0px7neSUxGM04DuDGUkDD6qxGjHDiUXDGAHD0tjD7jHmCdDeqDZectDbhtTSSAwD7YTYPU8LPi3XWutx1WNqPLTP6FaUTX//4Gm raKET8/zE9fAiPYtqPWDhp4b0oKtwGc=APqlDwQYADimXEW3X3xD', 'Hm_lpvt_0280ecaa2722243b1de4829d59602c72' => '1734267538', 'Hm_lpvt_690f687fe07b350f535d941f6f5ecb13' => '1734267538', '_clck' => '1eecbtv|2|frq|0|1810', 'tfstk' => 'goYKE8OUaofBKY_m-2iGEmJx-zcijUdF5pRbrTX3Vdp99IduxDRkXG1kUgAuxQ6JedXNtkcFK_gJCdXBrXWly4pNQ81QR9w1CsbC4HXlKTQJaKhinq0DTB7PRxDmoAICGJQPF4bSjNT3I49Znq0DOskRCJkD-7ScE955P6s5dOGOi_b7Ra95CG1fiJ_5PLGO5sfYO81CVVs1tO65Pa9W1fCoFn4RFk6Uy302b0-71tU7PFCdAqRCCz1wW6IdhBTLPzOf9MBXOOk49clNDpsJzjU9BUBRqtSUG0Q6ghvC6Z34dTxMMUKXTjEdnHOVDnjgIlvvKdYOjHnzTOt91nf6RjqNIh1JgNLZtl5wm__6RnF7PCQpxi16dJUWepvMWGxK4WW6XCtcfhkLb9TFNLS2rxzFdQO2unbxuJ6kjILJ2g-yoEdDRMBAZkGt6urPA1xFtZp-05LFK1Bm_-rz4MSN6tctgurPAsCOnfPU4uSFa', ];

网址:Database Exception – yii\db\Exception http://c.mxgxt.com/news/view/201231

相关内容

主演的《阳光之下》获得了db评分8.0分…
Apache Tomcat/7.0.11
【实战】利用MapReduce分析明星微博数据
明星sql数据库
重建数据库日志
什么是关联图谱?
m.55188.com
www.55188.com
开源数据库技术分享及未来展望|CIC 真·全明星阵容
ISFP 名人

随便看看