return str_replace(',', '.', (string) $text); } $this->connect(); $result = $this->connection->real_escape_string((string) $text); if ($extra) { $result = addcslashes($result, '%_'); } 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; 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(); // ... die die();}// Run the application - All executable code should be triggered through this filerequire_once __DIR__ . '/includes/app.php'; $this->options['ssl']['cipher'] ); } // 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['ssl']['cipher'] ); } // 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'], // Check if the server was disconnected. if (!$this->connected()) { try { // Attempt to reconnect. $this->connection = null; $this->connect(); } catch (ConnectionFailureException $e) { // If connect fails, ignore that exception and throw the normal exception. throw $exception; } $this->statement->setFetchMode($fetchMode, $class); } } // Execute the query and get the result set cursor. $this->execute(); // Get all of the rows from the result set as objects of type $class. while ($row = $this->fetchObject()) { if ($key) { $array[$row->$key] = $row; $this->connect(); $result = []; // Set the query to get the table fields statement. $fields = $this->setQuery('SHOW FULL COLUMNS FROM ' . $this->quoteName($this->escape($table)))->loadObjectList(); // If we only want the type as the value add just that to the list. if ($typeOnly) { foreach ($fields as $field) { $result[$field->Field] = preg_replace('/[(0-9)]/', '', $field->Type); $key = $db->getServerType() . ':' . $db->getName() . ':' . $this->_tbl; if (!isset(self::$tableFields[$key]) || $reload) { // Lookup the fields for this table only once. $name = $this->_tbl; $fields = $db->getTableColumns($name, false); if (empty($fields)) { throw new \UnexpectedValueException(\sprintf('No columns found for %s table', $name)); } $this->_tbl_key = $this->getKeyName(); $this->setDatabase($db); // Initialise the table properties. $fields = $this->getFields(); if ($fields) { foreach ($fields as $name => $v) { // Add the field if it is not already present. if (!$this->hasField($name)) { * * @since 1.7.0 */ public function __construct(DatabaseInterface $db, ?DispatcherInterface $dispatcher = null) { parent::__construct('#__users', 'id', $db, $dispatcher); // Initialise. $this->id = 0; $this->sendEmail = 0; } if (Factory::getContainer()->has($tableClass)) { return Factory::getContainer()->get($tableClass); } // Instantiate a new table class and return it. return new $tableClass($db); } /** * Add a filesystem path where Table should search for table class files. * $tabletype['name'] = $type; $tabletype['prefix'] = $prefix; } // Create the user table object return Table::getInstance($tabletype['name'], $tabletype['prefix']); } /** * Method to bind an associative array of data to a user object * * @since 1.7.0 */ public function load($id) { // Create the user table object $table = static::getTable(); // Load the UserModel object based on the user id or throw a warning. if (!$table->load($id)) { // Reset to guest user $this->guest = 1; // Create the user parameters object $this->_params = new Registry(); // Load the user if it exists if (!empty($identifier)) { $this->load($identifier); } else { // Initialise $this->id = 0; $this->sendEmail = 0; $this->guest = 1; * * @since 4.0.0 */ public function loadUserById(int $id): User { return new User($id); } /** * Method to get an instance of a user for the given username. * return Factory::getContainer()->get(UserFactoryInterface::class)->loadUserById($id); } // Check if the user ID is already cached. if (empty(self::$instances[$id])) { self::$instances[$id] = Factory::getContainer()->get(UserFactoryInterface::class)->loadUserById($id); } return self::$instances[$id]; } if (!($instance instanceof User)) { $instance = User::getInstance(); } } elseif (!($instance instanceof User) || \is_string($id) || $instance->id !== $id) { // Check if we have a string as the id or if the numeric id is the current instance $instance = User::getInstance($id); } return $instance; } foreach ($items as &$item) { $item->slug = $item->id . ':' . $item->alias; $item->catslug = $item->catid . ':' . $item->category_alias; $item->username = Factory::getUser($item->created_by)->name; $item->profile_image = $item->profile_image ?? ''; $item->link = Route::_(version_compare($JoomlaVersion, '4.0.0', '>=') ? Joomla\Component\Content\Site\Helper\RouteHelper::getArticleRoute($item->slug, $item->catid, $item->language) : ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language)); $attribs = json_decode($item->attribs); $item->tags = new TagsHelper; if (!\class_exists('SppagebuilderHelperArticles')) { require_once JPATH_ROOT . '/components/com_sppagebuilder/helpers/articles.php'; } $articlesCount = \SppagebuilderHelperArticles::getArticlesCount(); $articles = \SppagebuilderHelperArticles::getArticles($articlesCount); foreach ($articles as $article) { if ($article->alias === $alias) { return 'articles'; } } return $vars; } // determine collection type based on alias $collectionType = static::getCollectionTypeFromAlias($segments[0]); $collectionItemIds = static::getCollectionItemIdsFromSlugs($segments); $isValidCollectionPage = false; return $segments; } public function parse(&$segments) { $vars = SppagebuilderRouterBase::parseRoute($segments); if (count($vars)) { $segments = array(); } 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(); // ... die die();}// Run the application - All executable code should be triggered through this filerequire_once __DIR__ . '/includes/app.php';|
[2/2]
Error
|
|---|
Error:
mysqli object is not fully initialized
at /var/www/html/rubicsisorg/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:347
at mysqli->real_escape_string()
(/var/www/html/rubicsisorg/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:347)
at Joomla\Database\Mysqli\MysqliDriver->escape()
(/var/www/html/rubicsisorg/libraries/vendor/joomla/database/src/DatabaseDriver.php:1467)
at Joomla\Database\DatabaseDriver->quote()
(/var/www/html/rubicsisorg/administrator/components/com_templates/src/Model/StyleModel.php:712)
at Joomla\Component\Templates\Administrator\Model\StyleModel->getSiteTemplates()
(/var/www/html/rubicsisorg/libraries/src/Application/SiteApplication.php:460)
at Joomla\CMS\Application\SiteApplication->getTemplate()
(/var/www/html/rubicsisorg/libraries/src/Error/Renderer/HtmlRenderer.php:50)
at Joomla\CMS\Error\Renderer\HtmlRenderer->render()
(/var/www/html/rubicsisorg/libraries/src/Exception/ExceptionHandler.php:139)
at Joomla\CMS\Exception\ExceptionHandler::render()
(/var/www/html/rubicsisorg/libraries/src/Exception/ExceptionHandler.php:73)
at Joomla\CMS\Exception\ExceptionHandler::handleException()
(/var/www/html/rubicsisorg/libraries/src/Application/CMSApplication.php:334)
at Joomla\CMS\Application\CMSApplication->execute()
(/var/www/html/rubicsisorg/includes/app.php:58)
at require_once('/var/www/html/rubicsisorg/includes/app.php')
(/var/www/html/rubicsisorg/index.php:54)
|
|
[1/2]
mysqli_sql_exception
|
|---|
mysqli_sql_exception:
Connection refused
at /var/www/html/rubicsisorg/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:236
at mysqli->real_connect()
(/var/www/html/rubicsisorg/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:236)
at Joomla\Database\Mysqli\MysqliDriver->connect()
(/var/www/html/rubicsisorg/libraries/vendor/joomla/database/src/DatabaseDriver.php:670)
at Joomla\Database\DatabaseDriver->execute()
(/var/www/html/rubicsisorg/libraries/vendor/joomla/database/src/DatabaseDriver.php:1304)
at Joomla\Database\DatabaseDriver->loadObjectList()
(/var/www/html/rubicsisorg/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:539)
at Joomla\Database\Mysqli\MysqliDriver->getTableColumns()
(/var/www/html/rubicsisorg/libraries/src/Table/Table.php:260)
at Joomla\CMS\Table\Table->getFields()
(/var/www/html/rubicsisorg/libraries/src/Table/Table.php:204)
at Joomla\CMS\Table\Table->__construct()
(/var/www/html/rubicsisorg/libraries/src/Table/User.php:61)
at Joomla\CMS\Table\User->__construct()
(/var/www/html/rubicsisorg/libraries/src/Table/Table.php:352)
at Joomla\CMS\Table\Table::getInstance()
(/var/www/html/rubicsisorg/libraries/src/User/User.php:596)
at Joomla\CMS\User\User::getTable()
(/var/www/html/rubicsisorg/libraries/src/User/User.php:871)
at Joomla\CMS\User\User->load()
(/var/www/html/rubicsisorg/libraries/src/User/User.php:277)
at Joomla\CMS\User\User->__construct()
(/var/www/html/rubicsisorg/libraries/src/User/UserFactory.php:53)
at Joomla\CMS\User\UserFactory->loadUserById()
(/var/www/html/rubicsisorg/libraries/src/User/User.php:324)
at Joomla\CMS\User\User::getInstance()
(/var/www/html/rubicsisorg/libraries/src/Factory.php:380)
at Joomla\CMS\Factory::getUser()
(/var/www/html/rubicsisorg/components/com_sppagebuilder/helpers/articles.php:191)
at SppagebuilderHelperArticles::getArticles()
(/var/www/html/rubicsisorg/components/com_sppagebuilder/router.php:155)
at SppagebuilderRouterBase::getCollectionTypeFromAlias()
(/var/www/html/rubicsisorg/components/com_sppagebuilder/router.php:195)
at SppagebuilderRouterBase::parseRoute()
(/var/www/html/rubicsisorg/components/com_sppagebuilder/router.php:590)
at SppagebuilderRouter->parse()
(/var/www/html/rubicsisorg/libraries/src/Router/SiteRouter.php:287)
at Joomla\CMS\Router\SiteRouter->parseSefRoute()
(/var/www/html/rubicsisorg/libraries/src/Router/Router.php:423)
at Joomla\CMS\Router\Router->processParseRules()
(/var/www/html/rubicsisorg/libraries/src/Router/Router.php:158)
at Joomla\CMS\Router\Router->parse()
(/var/www/html/rubicsisorg/libraries/src/Application/SiteApplication.php:767)
at Joomla\CMS\Application\SiteApplication->route()
(/var/www/html/rubicsisorg/libraries/src/Application/SiteApplication.php:243)
at Joomla\CMS\Application\SiteApplication->doExecute()
(/var/www/html/rubicsisorg/libraries/src/Application/CMSApplication.php:304)
at Joomla\CMS\Application\CMSApplication->execute()
(/var/www/html/rubicsisorg/includes/app.php:58)
at require_once('/var/www/html/rubicsisorg/includes/app.php')
(/var/www/html/rubicsisorg/index.php:54)
|