$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); ->from($this->db->quoteName('#__session')) ->where($this->db->quoteName('session_id') . ' = :session_id') ->bind(':session_id', $sessionId) ->setLimit(1); $this->db->setQuery($query); try { $exists = $this->db->loadResult(); } catch (ExecutionFailureException $e) { return self::$sessionRecordUnknown; * @since 4.0.0 * @throws \RuntimeException */ public function createOrUpdateRecord(SessionInterface $session, User $user) { $exists = $this->checkSessionRecordExists($session->getId()); // Do not try to touch the database if we can't determine the record state if ($exists === self::$sessionRecordUnknown) { return; } // Whether to track Session Metadata for Guest user if (!$this->config->get('session_metadata_for_guest', true) && !$user->id) { return; } $this->metadataManager->createOrUpdateRecord($event->getSession(), $user); }} $this->serviceId ) ); } \call_user_func([$service, $this->method], $event); }} foreach ($this->listeners[$event->getName()] as $listener) { if ($event->isStopped()) { return $event; } $listener($event); } } return $event; } // Dispatch deprecated event $this->dispatcher->dispatch('onAfterSessionStart', new SessionEvent('onAfterSessionStart', $this)); } // Dispatch new event $this->dispatcher->dispatch(SessionEvents::START, new SessionEvent(SessionEvents::START, $this)); } } /** * Frees all session variables and destroys all data registered to a session * @since 1.0 */ public function has($name) { if (!$this->isActive()) { $this->start(); } return $this->store->has($name); } $name = $args[2] . '.' . $name; } } if (parent::has($name)) { // Parent is used because of b/c, can be changed in Joomla 6 return parent::get($name, $default); } /* __CLASS__ ), E_USER_DEPRECATED ); $instance = self::getApplication()->getSession()->get('user'); if (\is_null($id)) { if (!($instance instanceof User)) { $instance = User::getInstance(); }
defined('_JEXEC') or die;
$app = Factory::getApplication();
$doc = Factory::getDocument();
$user = Factory::getUser();
$this->language = $doc->language;
$this->direction = $doc->direction;
// Getting params from template
$params = $app->getTemplate(true)->params;
// Store the file path $this->_file = $directory . '/' . $filename; // Get the file content ob_start(); require $directory . '/' . $filename; $contents = ob_get_clean(); } return $contents; } $this->baseurl = Uri::base(true); $this->params = $params['params'] ?? new Registry(); $this->template = $template; // Load $this->_template = $this->_loadTemplate($baseDir, $file); return $this; } /** * * @since 1.7.0 */ public function parse($params = []) { return $this->_fetchTemplate($params)->_parseTemplate(); } /** * Outputs the template to the browser. * public function render($caching = false, $params = []) { $this->_caching = $caching; if (empty($this->_template)) { $this->parse($params); } if (\array_key_exists('csp_nonce', $params) && $params['csp_nonce'] !== null) { $this->cspNonce = $params['csp_nonce']; } $this->debug = $params['debug'] ?? false; $this->error = $this->_error; $params['file'] = 'error.php'; return parent::render($cache, $params); } /** * Render the backtrace * 'template' => $template->template, 'directory' => JPATH_THEMES, 'debug' => JDEBUG, 'csp_nonce' => $app->get('csp_nonce'), 'templateInherits' => $template->parent, 'params' => $template->params, ] ); }} '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 dirname(__FILE__) . '/includes/app.php'; ); } // Attempt to connect to the server, use error suppression to silence warnings and allow us to throw an Exception separately. $connected = @$this->connection->real_connect( $this->options['host'], $this->options['user'], $this->options['password'], null, $this->options['port'], $this->options['socket'], ); } // Attempt to connect to the server, use error suppression to silence warnings and allow us to throw an Exception separately. $connected = @$this->connection->real_connect( $this->options['host'], $this->options['user'], $this->options['password'], null, $this->options['port'], $this->options['socket'], * * @since 1.0 */ public function getVersion() { $this->connect(); if ($this->mariadb) { // MariaDB: Strip off any leading '5.5.5-', if present return preg_replace('/^5\.5\.5-/', '', $this->connection->server_info); } $db = $this->getDatabase(); $this->info = [ 'php' => php_uname(), 'dbserver' => $db->getServerType(), 'dbversion' => $db->getVersion(), 'dbcollation' => $db->getCollation(), 'dbconnectioncollation' => $db->getConnectionCollation(), 'dbconnectionencryption' => $db->getConnectionEncryption(), 'dbconnencryptsupported' => $db->isConnectionEncryptionSupported(), '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()), ]; } /** * Get Identity info. $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; } } $this->getDispatcher()->dispatch('onAfterRespond', AbstractEvent::create( 'onAfterRespond', [ 'subject' => $this->getApplication(), ] )); } // Closes the application. 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. * // 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); $this->authorise($Itemid); } // 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 dirname(__FILE__) . '/includes/app.php';|
[2/2]
Error
|
|---|
Error:
mysqli object is not fully initialized
at /home/enn/public_html/dev24.enn.com/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:138
at mysqli->prepare('SELECT `session_id`FROM `w283h_session`WHERE `session_id` = ? LIMIT 1')
(/home/enn/public_html/dev24.enn.com/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:138)
at Joomla\Database\Mysqli\MysqliStatement->__construct(object(mysqli), 'SELECT `session_id`FROM `w283h_session`WHERE `session_id` = ? LIMIT 1')
(/home/enn/public_html/dev24.enn.com/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:1020)
at Joomla\Database\Mysqli\MysqliDriver->prepareStatement('SELECT `session_id`FROM `w283h_session`WHERE `session_id` = :session_id LIMIT 1')
(/home/enn/public_html/dev24.enn.com/libraries/vendor/joomla/database/src/DatabaseDriver.php:1785)
at Joomla\Database\DatabaseDriver->setQuery(object(MysqliQuery))
(/home/enn/public_html/dev24.enn.com/libraries/src/Session/MetadataManager.php:184)
at Joomla\CMS\Session\MetadataManager->checkSessionRecordExists('55d4a43a2875b3cab1fdf29f24cef24e')
(/home/enn/public_html/dev24.enn.com/libraries/src/Session/MetadataManager.php:125)
at Joomla\CMS\Session\MetadataManager->createOrUpdateRecord(object(Session), object(User))
(/home/enn/public_html/dev24.enn.com/libraries/src/Session/EventListener/MetadataManagerListener.php:80)
at Joomla\CMS\Session\EventListener\MetadataManagerListener->onAfterSessionStart(object(SessionEvent))
(/home/enn/public_html/dev24.enn.com/libraries/vendor/joomla/event/src/LazyServiceEventListener.php:124)
at Joomla\Event\LazyServiceEventListener->__invoke(object(SessionEvent))
(/home/enn/public_html/dev24.enn.com/libraries/vendor/joomla/event/src/Dispatcher.php:454)
at Joomla\Event\Dispatcher->dispatch('session.start', object(SessionEvent))
(/home/enn/public_html/dev24.enn.com/libraries/vendor/joomla/session/src/Session.php:428)
at Joomla\Session\Session->start()
(/home/enn/public_html/dev24.enn.com/libraries/vendor/joomla/session/src/Session.php:327)
at Joomla\Session\Session->has('user')
(/home/enn/public_html/dev24.enn.com/libraries/src/Session/Session.php:194)
at Joomla\CMS\Session\Session->get('user')
(/home/enn/public_html/dev24.enn.com/libraries/src/Factory.php:372)
at Joomla\CMS\Factory::getUser()
(/home/enn/public_html/dev24.enn.com/templates/ja_purity_iv/error.php:19)
at require('/home/enn/public_html/dev24.enn.com/templates/ja_purity_iv/error.php')
(/home/enn/public_html/dev24.enn.com/libraries/src/Document/HtmlDocument.php:731)
at Joomla\CMS\Document\HtmlDocument->_loadTemplate('/home/enn/public_html/dev24.enn.com/templates/ja_purity_iv', 'error.php')
(/home/enn/public_html/dev24.enn.com/libraries/src/Document/HtmlDocument.php:785)
at Joomla\CMS\Document\HtmlDocument->_fetchTemplate(array('template' => 'ja_purity_iv', 'directory' => '/home/enn/public_html/dev24.enn.com/templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
(/home/enn/public_html/dev24.enn.com/libraries/src/Document/HtmlDocument.php:622)
at Joomla\CMS\Document\HtmlDocument->parse(array('template' => 'ja_purity_iv', 'directory' => '/home/enn/public_html/dev24.enn.com/templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
(/home/enn/public_html/dev24.enn.com/libraries/src/Document/HtmlDocument.php:640)
at Joomla\CMS\Document\HtmlDocument->render(false, array('template' => 'ja_purity_iv', 'directory' => '/home/enn/public_html/dev24.enn.com/templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
(/home/enn/public_html/dev24.enn.com/libraries/src/Document/ErrorDocument.php:139)
at Joomla\CMS\Document\ErrorDocument->render(false, array('template' => 'ja_purity_iv', 'directory' => '/home/enn/public_html/dev24.enn.com/templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
(/home/enn/public_html/dev24.enn.com/libraries/src/Error/Renderer/HtmlRenderer.php:78)
at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(mysqli_sql_exception))
(/home/enn/public_html/dev24.enn.com/libraries/src/Exception/ExceptionHandler.php:136)
at Joomla\CMS\Exception\ExceptionHandler::render(object(mysqli_sql_exception))
(/home/enn/public_html/dev24.enn.com/libraries/src/Exception/ExceptionHandler.php:73)
at Joomla\CMS\Exception\ExceptionHandler::handleException(object(mysqli_sql_exception))
(/home/enn/public_html/dev24.enn.com/libraries/src/Application/CMSApplication.php:336)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/enn/public_html/dev24.enn.com/includes/app.php:58)
at require_once('/home/enn/public_html/dev24.enn.com/includes/app.php')
(/home/enn/public_html/dev24.enn.com/index.php:32)
|
|
[1/2]
mysqli_sql_exception
|
|---|
mysqli_sql_exception:
User enn_j35 already has more than 'max_user_connections' active connections
at /home/enn/public_html/dev24.enn.com/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:286
at mysqli->real_connect('localhost', 'enn_j35', 'enn_j35p123', null, 3306, null, 0)
(/home/enn/public_html/dev24.enn.com/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:286)
at Joomla\Database\Mysqli\MysqliDriver->connect()
(/home/enn/public_html/dev24.enn.com/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:647)
at Joomla\Database\Mysqli\MysqliDriver->getVersion()
(/home/enn/public_html/dev24.enn.com/administrator/components/com_admin/src/Model/SysinfoModel.php:318)
at Joomla\Component\Admin\Administrator\Model\SysinfoModel->getInfo()
(/home/enn/public_html/dev24.enn.com/plugins/system/debug/src/DataCollector/InfoCollector.php:136)
at Joomla\Plugin\System\Debug\DataCollector\InfoCollector->collect()
(/home/enn/public_html/dev24.enn.com/libraries/vendor/maximebf/debugbar/src/DebugBar/DebugBar.php:238)
at DebugBar\DebugBar->collect()
(/home/enn/public_html/dev24.enn.com/libraries/vendor/maximebf/debugbar/src/DebugBar/DebugBar.php:265)
at DebugBar\DebugBar->getData()
(/home/enn/public_html/dev24.enn.com/plugins/system/debug/src/JavascriptRenderer.php:119)
at Joomla\Plugin\System\Debug\JavascriptRenderer->render()
(/home/enn/public_html/dev24.enn.com/plugins/system/debug/src/Extension/Debug.php:369)
at Joomla\Plugin\System\Debug\Extension\Debug->onAfterRespond(object(AfterRespondEvent))
(/home/enn/public_html/dev24.enn.com/libraries/vendor/joomla/event/src/Dispatcher.php:454)
at Joomla\Event\Dispatcher->dispatch('onAfterRespond', object(AfterRespondEvent))
(/home/enn/public_html/dev24.enn.com/plugins/system/cache/src/Extension/Cache.php:184)
at Joomla\Plugin\System\Cache\Extension\Cache->onAfterRoute(object(AfterRouteEvent))
(/home/enn/public_html/dev24.enn.com/libraries/vendor/joomla/event/src/Dispatcher.php:454)
at Joomla\Event\Dispatcher->dispatch('onAfterRoute', object(AfterRouteEvent))
(/home/enn/public_html/dev24.enn.com/libraries/vendor/joomla/application/src/AbstractApplication.php:99)
at Joomla\Application\AbstractApplication->dispatchEvent('onAfterRoute', object(AfterRouteEvent))
(/home/enn/public_html/dev24.enn.com/libraries/src/Application/SiteApplication.php:800)
at Joomla\CMS\Application\SiteApplication->route()
(/home/enn/public_html/dev24.enn.com/libraries/src/Application/SiteApplication.php:244)
at Joomla\CMS\Application\SiteApplication->doExecute()
(/home/enn/public_html/dev24.enn.com/libraries/src/Application/CMSApplication.php:306)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/enn/public_html/dev24.enn.com/includes/app.php:58)
at require_once('/home/enn/public_html/dev24.enn.com/includes/app.php')
(/home/enn/public_html/dev24.enn.com/index.php:32)
|