mysqli_sql_exception {#947 #sqlstate: "3D000" }
$this->connection = $connection; $this->query = $query; $query = $this->prepareParameterKeyMapping($query); $this->statement = $connection->prepare($query); if (!$this->statement) { throw new PrepareStatementFailureException($this->connection->error, $this->connection->errno); } } $this->connection = $connection; $this->query = $query; $query = $this->prepareParameterKeyMapping($query); $this->statement = $connection->prepare($query); if (!$this->statement) { throw new PrepareStatementFailureException($this->connection->error, $this->connection->errno); } } * @since 2.0.0 * @throws PrepareStatementFailureException */ protected function prepareStatement(string $query): StatementInterface { return new MysqliStatement($this->connection, $query); } /** * Unlocks tables in the database. * $query->setLimit($limit, $offset); $sql = $this->replacePrefix((string) $query); $this->statement = $this->prepareStatement($sql); $this->sql = $query; $this->limit = (int) max(0, $limit); $this->offset = (int) max(0, $offset); $db->quoteName('e.element') . ' = ' . $db->quoteName('s.template') . ' AND ' . $db->quoteName('e.type') . ' = ' . $db->quote('template') . ' AND ' . $db->quoteName('e.client_id') . ' = ' . $db->quoteName('s.client_id') ); $db->setQuery($query); return $db->loadObjectList('id'); } /** if ($cache->contains($cacheId)) { $templates = $cache->get($cacheId); } else { $templates = $this->bootComponent('templates')->getMVCFactory() ->createModel('Style', 'Administrator')->getSiteTemplates(); foreach ($templates as &$template) { // Create home element if ($template->home == 1 && !isset($template_home) || $this->getLanguageFilter() && $template->home == $tag) { $template_home = clone $template; public function render(\Throwable $error): string { $app = Factory::getApplication(); // Get the current template from the application $template = $app->getTemplate(true); // Push the error object into the document $this->getDocument()->setError($error); // Add registry file for the template asset 'subject' => $app, 'document' => $renderer->getDocument(), ]) ); $data = $renderer->render($error); // If nothing was rendered, just use the message from the Exception if (empty($data)) { $data = $error->getMessage(); } * @since 3.10.0 */ public static function handleException(\Throwable $error) { static::logException($error); static::render($error); } /** * Render the error page based on an exception. * ); // Trigger the onError event. $this->dispatchEvent('onError', $event); ExceptionHandler::handleException($event->getError()); } // Trigger the onBeforeRespond event. $this->dispatchEvent( 'onBeforeRespond',// Set the application as global app\Joomla\CMS\Factory::$application = $app;// Execute the application.$app->execute(); * define() is used rather than "const" to not error for PHP 5.2 and lower */define('_JEXEC', 1);// Run the application - All executable code should be triggered through this filerequire_once __DIR__ . '/includes/app.php'; if (!$database) { return false; } if (!$this->connection->select_db($database)) { throw new ConnectionFailureException('Could not connect to database.'); } return true; } if (!$database) { return false; } if (!$this->connection->select_db($database)) { throw new ConnectionFailureException('Could not connect to database.'); } return true; } // And read the real sql mode to mitigate changes in mysql > 5.7.+ $this->options['sqlModes'] = explode(',', $this->setQuery('SELECT @@SESSION.sql_mode;')->loadResult()); // If auto-select is enabled select the given database. if ($this->options['select'] && !empty($this->options['database'])) { $this->select($this->options['database']); } $this->mariadb = stripos($this->connection->server_info, 'mariadb') !== false; $this->utf8mb4 = $this->serverClaimsUtf8mb4Support(); if (\is_float($text)) { // Force the dot as a decimal point. return str_replace(',', '.', (string) $text); } $this->connect(); $result = $this->connection->real_escape_string((string) $text); if ($extra) { $result = addcslashes($result, '%_'); } return $text; } return '\'' . ($escape ? $this->escape($text) : $text) . '\''; } /** * Quotes a binary string to database requirements for use in database queries. * ) ->join( 'LEFT', $db->quoteName('#__extensions', 'e'), $db->quoteName('e.element') . ' = ' . $db->quoteName('s.template') . ' AND ' . $db->quoteName('e.type') . ' = ' . $db->quote('template') . ' AND ' . $db->quoteName('e.client_id') . ' = ' . $db->quoteName('s.client_id') ); $db->setQuery($query); if ($cache->contains($cacheId)) { $templates = $cache->get($cacheId); } else { $templates = $this->bootComponent('templates')->getMVCFactory() ->createModel('Style', 'Administrator')->getSiteTemplates(); foreach ($templates as &$template) { // Create home element if ($template->home == 1 && !isset($template_home) || $this->getLanguageFilter() && $template->home == $tag) { $template_home = clone $template; 'phpVersion' => PHP_VERSION, 'joomlaVersion' => JVERSION, 'requestId' => $this->requestId, 'identity' => $this->getIdentityInfo($application->getIdentity()), 'response' => $this->getResponseInfo($application->getResponse()), 'template' => $this->getTemplateInfo($application->getTemplate(true)), 'database' => $this->getDatabaseInfo($model->getInfo()), ]; } /** $request_variables ) ); foreach ($this->collectors as $name => $collector) { $this->data[$name] = $collector->collect(); } // Remove all invalid (non UTF-8) characters array_walk_recursive($this->data, function (&$item) { if (is_string($item) && !mb_check_encoding($item, 'UTF-8')) { * @return array */ public function getData() { if ($this->data === null) { $this->collect(); } return $this->data; } /** $js .= $this->getAddDatasetCode($id, $data, '(stacked)'); } } $suffix = !$initialize ? '(ajax)' : null; $js .= $this->getAddDatasetCode($this->debugBar->getCurrentRequestId(), $this->debugBar->getData(), $suffix); $nonce = ''; if ($doc->cspNonce) { $nonce = ' nonce="' . $doc->cspNonce . '"'; echo $contents; return; } echo str_replace('</body>', $debugBarRenderer->renderHead() . $debugBarRenderer->render() . '</body>', $contents); } /** * AJAX handler * foreach ($this->listeners[$event->getName()] as $listener) { if ($event->isStopped()) { return $event; } $listener($event); } } return $event; } if ($this->profiler) { $this->profiler->mark('afterCache'); } $this->getDispatcher()->dispatch('onAfterRespond', new AfterRespondEvent( 'onAfterRespond', [ 'subject' => $app, ] )); foreach ($this->listeners[$event->getName()] as $listener) { if ($event->isStopped()) { return $event; } $listener($event); } } return $event; } $dispatcher = $this->getDispatcher(); } catch (\UnexpectedValueException $exception) { return null; } return $dispatcher->dispatch($eventName, $event ?: new ApplicationEvent($eventName, $this)); } /** * Method to run the application routines. * $this->input->def($key, $value); } // Trigger the onAfterRoute event. PluginHelper::importPlugin('system', null, true, $this->getDispatcher()); $this->dispatchEvent( 'onAfterRoute', new AfterRouteEvent('onAfterRoute', ['subject' => $this]) ); $Itemid = $this->input->getInt('Itemid', null); // Mark afterInitialise in the profiler. JDEBUG ? $this->profiler->mark('afterInitialise') : null; // Route the application $this->route(); // Mark afterRoute in the profiler. JDEBUG ? $this->profiler->mark('afterRoute') : null; if (!$this->isHandlingMultiFactorAuthentication()) { $this->sanityCheckSystemVariables(); $this->setupLogging(); $this->createExtensionNamespaceMap(); // Perform application routines. $this->doExecute(); // If we have an application document object, render it. if ($this->document instanceof \Joomla\CMS\Document\Document) { // Render the application output. $this->render();// Set the application as global app\Joomla\CMS\Factory::$application = $app;// Execute the application.$app->execute(); * define() is used rather than "const" to not error for PHP 5.2 and lower */define('_JEXEC', 1);// Run the application - All executable code should be triggered through this filerequire_once __DIR__ . '/includes/app.php';|
[2/2]
mysqli_sql_exception
|
|---|
mysqli_sql_exception:
No database selected
at /home/forge/demo-next.jreviews.com/public/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:138
at mysqli->prepare()
(/home/forge/demo-next.jreviews.com/public/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:138)
at Joomla\Database\Mysqli\MysqliStatement->__construct()
(/home/forge/demo-next.jreviews.com/public/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:972)
at Joomla\Database\Mysqli\MysqliDriver->prepareStatement()
(/home/forge/demo-next.jreviews.com/public/libraries/vendor/joomla/database/src/DatabaseDriver.php:1780)
at Joomla\Database\DatabaseDriver->setQuery()
(/home/forge/demo-next.jreviews.com/public/administrator/components/com_templates/src/Model/StyleModel.php:716)
at Joomla\Component\Templates\Administrator\Model\StyleModel->getSiteTemplates()
(/home/forge/demo-next.jreviews.com/public/libraries/src/Application/SiteApplication.php:460)
at Joomla\CMS\Application\SiteApplication->getTemplate()
(/home/forge/demo-next.jreviews.com/public/libraries/src/Error/Renderer/HtmlRenderer.php:50)
at Joomla\CMS\Error\Renderer\HtmlRenderer->render()
(/home/forge/demo-next.jreviews.com/public/libraries/src/Exception/ExceptionHandler.php:136)
at Joomla\CMS\Exception\ExceptionHandler::render()
(/home/forge/demo-next.jreviews.com/public/libraries/src/Exception/ExceptionHandler.php:73)
at Joomla\CMS\Exception\ExceptionHandler::handleException()
(/home/forge/demo-next.jreviews.com/public/libraries/src/Application/CMSApplication.php:334)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/forge/demo-next.jreviews.com/public/includes/app.php:58)
at require_once('/home/forge/demo-next.jreviews.com/public/includes/app.php')
(/home/forge/demo-next.jreviews.com/public/index.php:32)
|
|
[1/2]
mysqli_sql_exception
|
|---|
mysqli_sql_exception:
Unknown database 'next'
at /home/forge/demo-next.jreviews.com/public/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:786
at mysqli->select_db()
(/home/forge/demo-next.jreviews.com/public/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:786)
at Joomla\Database\Mysqli\MysqliDriver->select()
(/home/forge/demo-next.jreviews.com/public/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:263)
at Joomla\Database\Mysqli\MysqliDriver->connect()
(/home/forge/demo-next.jreviews.com/public/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:345)
at Joomla\Database\Mysqli\MysqliDriver->escape()
(/home/forge/demo-next.jreviews.com/public/libraries/vendor/joomla/database/src/DatabaseDriver.php:1467)
at Joomla\Database\DatabaseDriver->quote()
(/home/forge/demo-next.jreviews.com/public/administrator/components/com_templates/src/Model/StyleModel.php:712)
at Joomla\Component\Templates\Administrator\Model\StyleModel->getSiteTemplates()
(/home/forge/demo-next.jreviews.com/public/libraries/src/Application/SiteApplication.php:460)
at Joomla\CMS\Application\SiteApplication->getTemplate()
(/home/forge/demo-next.jreviews.com/public/plugins/system/debug/src/DataCollector/InfoCollector.php:135)
at Joomla\Plugin\System\Debug\DataCollector\InfoCollector->collect()
(/home/forge/demo-next.jreviews.com/public/libraries/vendor/php-debugbar/php-debugbar/src/DebugBar/DebugBar.php:238)
at DebugBar\DebugBar->collect()
(/home/forge/demo-next.jreviews.com/public/libraries/vendor/php-debugbar/php-debugbar/src/DebugBar/DebugBar.php:265)
at DebugBar\DebugBar->getData()
(/home/forge/demo-next.jreviews.com/public/plugins/system/debug/src/JavascriptRenderer.php:119)
at Joomla\Plugin\System\Debug\JavascriptRenderer->render()
(/home/forge/demo-next.jreviews.com/public/plugins/system/debug/src/Extension/Debug.php:379)
at Joomla\Plugin\System\Debug\Extension\Debug->onAfterRespond()
(/home/forge/demo-next.jreviews.com/public/libraries/vendor/joomla/event/src/Dispatcher.php:454)
at Joomla\Event\Dispatcher->dispatch()
(/home/forge/demo-next.jreviews.com/public/plugins/system/cache/src/Extension/Cache.php:194)
at Joomla\Plugin\System\Cache\Extension\Cache->onAfterRoute()
(/home/forge/demo-next.jreviews.com/public/libraries/vendor/joomla/event/src/Dispatcher.php:454)
at Joomla\Event\Dispatcher->dispatch()
(/home/forge/demo-next.jreviews.com/public/libraries/vendor/joomla/application/src/AbstractApplication.php:99)
at Joomla\Application\AbstractApplication->dispatchEvent()
(/home/forge/demo-next.jreviews.com/public/libraries/src/Application/SiteApplication.php:811)
at Joomla\CMS\Application\SiteApplication->route()
(/home/forge/demo-next.jreviews.com/public/libraries/src/Application/SiteApplication.php:243)
at Joomla\CMS\Application\SiteApplication->doExecute()
(/home/forge/demo-next.jreviews.com/public/libraries/src/Application/CMSApplication.php:304)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/forge/demo-next.jreviews.com/public/includes/app.php:58)
at require_once('/home/forge/demo-next.jreviews.com/public/includes/app.php')
(/home/forge/demo-next.jreviews.com/public/index.php:32)
|