$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
// Reset the document object in the factory, this gives us a clean slate and lets everything render properly
Factory::$document = $renderer->getDocument();
Factory::getApplication()->loadDocument(Factory::$document);
$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->triggerEvent('onError', $event);
ExceptionHandler::handleException($event->getError());
}
// Trigger the onBeforeRespond event.
$this->getDispatcher()->dispatch('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 file
require_once dirname(__FILE__) . '/includes/app.php';
$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);
->select($db->quoteName('id'))
->from($db->quoteName('#__ars_categories'))
->where($db->quoteName('alias') . ' = :alias')
->bind(':alias', $segment);
return $db->setQuery($sql)->loadResult() ?: false;
}
public function getItemsSegment($release_id, $query)
{
/** @var ReleaseTable $release */
break;
}
} elseif (\is_callable([$this->router, 'get' . ucfirst($view->name) . 'Id'])) {
// Hand the data over to the router specific method and see if there is a content item that fits
$key = \call_user_func_array([$this->router, 'get' . ucfirst($view->name) . 'Id'], [$segment, $vars]);
if ($key) {
// Found the right view and the right item
$parent = $views[$vars['view']];
$vars['view'] = $view->name;
{
$vars = [];
// Process the parsed variables based on custom defined rules
foreach ($this->rules as $rule) {
$rule->parse($segments, $vars);
}
return $vars;
}
if (\count($segments)) {
// Handle component route
$component = preg_replace('/[^A-Z0-9_\.-]/i', '', $uri->getVar('option'));
$crouter = $this->getComponentRouter($component);
$uri->setQuery(array_merge($uri->getQuery(true), $crouter->parse($segments)));
}
$route = implode('/', $segments);
}
if (!\array_key_exists('parse' . $stage, $this->rules)) {
throw new \InvalidArgumentException(sprintf('The %s stage is not registered. (%s)', $stage, __METHOD__));
}
foreach ($this->rules['parse' . $stage] as $rule) {
$rule($this, $uri);
}
}
/**
* Process the build uri query data based on custom defined rules
{
// Do the preprocess stage of the URL parse process
$this->processParseRules($uri, self::PROCESS_BEFORE);
// Do the main stage of the URL parse process
$this->processParseRules($uri);
// Do the postprocess stage of the URL parse process
$this->processParseRules($uri, self::PROCESS_AFTER);
// Check if all parts of the URL have been parsed.
// Get the full request URI.
$uri = clone Uri::getInstance();
// It is not possible to inject the SiteRouter as it requires a SiteApplication
// and we would end in an infinite loop
$result = $this->getContainer()->get(SiteRouter::class)->parse($uri, true);
$active = $this->getMenu()->getActive();
if (
$active !== 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 file
require_once dirname(__FILE__) . '/includes/app.php';
[2/2]
mysqli_sql_exception
|
---|
mysqli_sql_exception: MySQL server has gone away at /hp/mv/www/visj4/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137 at mysqli->prepare('SELECT `id`,`home`,`template`,`s`.`params`,`inheritable`,`parent`FROM `vf38_template_styles` AS `s`LEFT JOIN `vf38_extensions` AS `e` ON `e`.`element` = `s`.`template` AND `e`.`type` = \'template\' AND `e`.`client_id` = `s`.`client_id`WHERE `s`.`client_id` = 0 AND `e`.`enabled` = 1') (/hp/mv/www/visj4/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137) at Joomla\Database\Mysqli\MysqliStatement->__construct(object(mysqli), 'SELECT `id`,`home`,`template`,`s`.`params`,`inheritable`,`parent`FROM `vf38_template_styles` AS `s`LEFT JOIN `vf38_extensions` AS `e` ON `e`.`element` = `s`.`template` AND `e`.`type` = \'template\' AND `e`.`client_id` = `s`.`client_id`WHERE `s`.`client_id` = 0 AND `e`.`enabled` = 1') (/hp/mv/www/visj4/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:1089) at Joomla\Database\Mysqli\MysqliDriver->prepareStatement('SELECT `id`,`home`,`template`,`s`.`params`,`inheritable`,`parent`FROM `vf38_template_styles` AS `s`LEFT JOIN `vf38_extensions` AS `e` ON `e`.`element` = `s`.`template` AND `e`.`type` = \'template\' AND `e`.`client_id` = `s`.`client_id`WHERE `s`.`client_id` = 0 AND `e`.`enabled` = 1') (/hp/mv/www/visj4/libraries/vendor/joomla/database/src/DatabaseDriver.php:1900) at Joomla\Database\DatabaseDriver->setQuery(object(MysqliQuery)) (/hp/mv/www/visj4/administrator/components/com_templates/src/Model/StyleModel.php:771) at Joomla\Component\Templates\Administrator\Model\StyleModel->getSiteTemplates() (/hp/mv/www/visj4/libraries/src/Application/SiteApplication.php:453) at Joomla\CMS\Application\SiteApplication->getTemplate(true) (/hp/mv/www/visj4/libraries/src/Error/Renderer/HtmlRenderer.php:50) at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(mysqli_sql_exception)) (/hp/mv/www/visj4/libraries/src/Exception/ExceptionHandler.php:126) at Joomla\CMS\Exception\ExceptionHandler::render(object(mysqli_sql_exception)) (/hp/mv/www/visj4/libraries/src/Exception/ExceptionHandler.php:72) at Joomla\CMS\Exception\ExceptionHandler::handleException(object(mysqli_sql_exception)) (/hp/mv/www/visj4/libraries/src/Application/CMSApplication.php:322) at Joomla\CMS\Application\CMSApplication->execute() (/hp/mv/www/visj4/includes/app.php:61) at require_once('/hp/mv/www/visj4/includes/app.php') (/hp/mv/www/visj4/index.php:32) |
[1/2]
mysqli_sql_exception
|
---|
mysqli_sql_exception: MySQL server has gone away at /hp/mv/www/visj4/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137 at mysqli->prepare('SELECT `id`FROM `vf38_ars_categories`WHERE `alias` = ?') (/hp/mv/www/visj4/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137) at Joomla\Database\Mysqli\MysqliStatement->__construct(object(mysqli), 'SELECT `id`FROM `vf38_ars_categories`WHERE `alias` = ?') (/hp/mv/www/visj4/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:1089) at Joomla\Database\Mysqli\MysqliDriver->prepareStatement('SELECT `id`FROM `vf38_ars_categories`WHERE `alias` = :alias') (/hp/mv/www/visj4/libraries/vendor/joomla/database/src/DatabaseDriver.php:1900) at Joomla\Database\DatabaseDriver->setQuery(object(MysqliQuery)) (/hp/mv/www/visj4/components/com_ars/src/Service/Router.php:315) at Akeeba\Component\ARS\Site\Service\Router->getReleasesId('joomla-form-extension-visforms', array('option' => 'com_ars', 'view' => 'categories', 'layout' => 'normal')) (/hp/mv/www/visj4/libraries/src/Component/Router/Rules/StandardRules.php:129) at Joomla\CMS\Component\Router\Rules\StandardRules->parse(array('joomla-form-extension-visforms', 'joomla-form-extension-visforms-stable', 'visforms_j3-3-6_3-10-3-2-zip'), array('option' => 'com_ars', 'view' => 'categories', 'layout' => 'normal')) (/hp/mv/www/visj4/libraries/src/Component/Router/RouterView.php:250) at Joomla\CMS\Component\Router\RouterView->parse(array('joomla-form-extension-visforms', 'joomla-form-extension-visforms-stable', 'visforms_j3-3-6_3-10-3-2-zip')) (/hp/mv/www/visj4/libraries/src/Router/SiteRouter.php:287) at Joomla\CMS\Router\SiteRouter->parseSefRoute(object(SiteRouter), object(Uri)) (/hp/mv/www/visj4/libraries/src/Router/Router.php:384) at Joomla\CMS\Router\Router->processParseRules(object(Uri)) (/hp/mv/www/visj4/libraries/src/Router/Router.php:147) at Joomla\CMS\Router\Router->parse(object(Uri), true) (/hp/mv/www/visj4/libraries/src/Application/SiteApplication.php:746) at Joomla\CMS\Application\SiteApplication->route() (/hp/mv/www/visj4/libraries/src/Application/SiteApplication.php:232) at Joomla\CMS\Application\SiteApplication->doExecute() (/hp/mv/www/visj4/libraries/src/Application/CMSApplication.php:293) at Joomla\CMS\Application\CMSApplication->execute() (/hp/mv/www/visj4/includes/app.php:61) at require_once('/hp/mv/www/visj4/includes/app.php') (/hp/mv/www/visj4/index.php:32) |