mysqli_sql_exception Error

HTTP 500 Whoops, looks like something went wrong.

mysqli object is not fully initialized

Exceptions 2

Error

  1.             return str_replace(',''.', (string) $text);
  2.         }
  3.         $this->connect();
  4.         $result $this->connection->real_escape_string((string) $text);
  5.         if ($extra)
  6.         {
  7.             $result addcslashes($result'%_');
  8.         }
  1.             return str_replace(',''.', (string) $text);
  2.         }
  3.         $this->connect();
  4.         $result $this->connection->real_escape_string((string) $text);
  5.         if ($extra)
  6.         {
  7.             $result addcslashes($result'%_');
  8.         }
  1.             }
  2.             return $text;
  3.         }
  4.         return '\'' . ($escape $this->escape($text) : $text) . '\'';
  5.     }
  6.     /**
  7.      * Quotes a binary string to database requirements for use in database queries.
  8.      *
  1.             )
  2.             ->join(
  3.                 'LEFT',
  4.                 $db->quoteName('#__extensions''e'),
  5.                 $db->quoteName('e.element') . ' = ' $db->quoteName('s.template')
  6.                     . ' AND ' $db->quoteName('e.type') . ' = ' $db->quote('template')
  7.                     . ' AND ' $db->quoteName('e.client_id') . ' = ' $db->quoteName('s.client_id')
  8.             );
  9.         $db->setQuery($query);
  1.         if ($cache->contains($cacheId)) {
  2.             $templates $cache->get($cacheId);
  3.         } else {
  4.             $templates $this->bootComponent('templates')->getMVCFactory()
  5.                 ->createModel('Style''Administrator')->getSiteTemplates();
  6.             foreach ($templates as &$template) {
  7.                 // Create home element
  8.                 if ($template->home == && !isset($template_home) || $this->getLanguageFilter() && $template->home == $tag) {
  9.                     $template_home = clone $template;
  1.     public function render(\Throwable $error): string
  2.     {
  3.         $app Factory::getApplication();
  4.         // Get the current template from the application
  5.         $template $app->getTemplate(true);
  6.         // Push the error object into the document
  7.         $this->getDocument()->setError($error);
  8.         // Add registry file for the template asset
HtmlRenderer->render(object(mysqli_sql_exception)) in /home/websitesunlcom/public_html/create/libraries/src/Exception/ExceptionHandler.php (line 126)
  1.             // Reset the document object in the factory, this gives us a clean slate and lets everything render properly
  2.             Factory::$document $renderer->getDocument();
  3.             Factory::getApplication()->loadDocument(Factory::$document);
  4.             $data $renderer->render($error);
  5.             // If nothing was rendered, just use the message from the Exception
  6.             if (empty($data)) {
  7.                 $data $error->getMessage();
  8.             }
ExceptionHandler::render(object(mysqli_sql_exception)) in /home/websitesunlcom/public_html/create/libraries/src/Exception/ExceptionHandler.php (line 72)
  1.      * @since   3.10.0
  2.      */
  3.     public static function handleException(\Throwable $error)
  4.     {
  5.         static::logException($error);
  6.         static::render($error);
  7.     }
  8.     /**
  9.      * Render the error page based on an exception.
  10.      *
ExceptionHandler::handleException(object(mysqli_sql_exception)) in /home/websitesunlcom/public_html/create/libraries/src/Application/CMSApplication.php (line 322)
  1.             );
  2.             // Trigger the onError event.
  3.             $this->triggerEvent('onError'$event);
  4.             ExceptionHandler::handleException($event->getError());
  5.         }
  6.         // Trigger the onBeforeRespond event.
  7.         $this->getDispatcher()->dispatch('onBeforeRespond');
CMSApplication->execute() in /home/websitesunlcom/public_html/create/includes/app.php (line 61)
  1. // Set the application as global app
  2. \Joomla\CMS\Factory::$application $app;
  3. // Execute the application.
  4. $app->execute();
require_once('/home/websitesunlcom/public_html/create/includes/app.php') in /home/websitesunlcom/public_html/create/index.php (line 32)
  1.  * define() is used rather than "const" to not error for PHP 5.2 and lower
  2.  */
  3. define('_JEXEC'1);
  4. // Run the application - All executable code should be triggered through this file
  5. require_once dirname(__FILE__) . '/includes/app.php';

mysqli_sql_exception

Too many connections

  1.                 $this->options['ssl']['cipher']
  2.             );
  3.         }
  4.         // Attempt to connect to the server, use error suppression to silence warnings and allow us to throw an Exception separately.
  5.         $connected = @$this->connection->real_connect(
  6.             $this->options['host'],
  7.             $this->options['user'],
  8.             $this->options['password'],
  9.             null,
  10.             $this->options['port'],
  1.                 $this->options['ssl']['cipher']
  2.             );
  3.         }
  4.         // Attempt to connect to the server, use error suppression to silence warnings and allow us to throw an Exception separately.
  5.         $connected = @$this->connection->real_connect(
  6.             $this->options['host'],
  7.             $this->options['user'],
  8.             $this->options['password'],
  9.             null,
  10.             $this->options['port'],
  1.         {
  2.             // Force the dot as a decimal point.
  3.             return str_replace(',''.', (string) $text);
  4.         }
  5.         $this->connect();
  6.         $result $this->connection->real_escape_string((string) $text);
  7.         if ($extra)
  8.         {
  1.             }
  2.             return $text;
  3.         }
  4.         return '\'' . ($escape $this->escape($text) : $text) . '\'';
  5.     }
  6.     /**
  7.      * Quotes a binary string to database requirements for use in database queries.
  8.      *
  1.             )
  2.             ->join(
  3.                 'LEFT',
  4.                 $db->quoteName('#__extensions''e'),
  5.                 $db->quoteName('e.element') . ' = ' $db->quoteName('s.template')
  6.                     . ' AND ' $db->quoteName('e.type') . ' = ' $db->quote('template')
  7.                     . ' AND ' $db->quoteName('e.client_id') . ' = ' $db->quoteName('s.client_id')
  8.             );
  9.         $db->setQuery($query);
  1.         if ($cache->contains($cacheId)) {
  2.             $templates $cache->get($cacheId);
  3.         } else {
  4.             $templates $this->bootComponent('templates')->getMVCFactory()
  5.                 ->createModel('Style''Administrator')->getSiteTemplates();
  6.             foreach ($templates as &$template) {
  7.                 // Create home element
  8.                 if ($template->home == && !isset($template_home) || $this->getLanguageFilter() && $template->home == $tag) {
  9.                     $template_home = clone $template;
  1.             'phpVersion'    => PHP_VERSION,
  2.             'joomlaVersion' => JVERSION,
  3.             'requestId'     => $this->requestId,
  4.             'identity'      => $this->getIdentityInfo($application->getIdentity()),
  5.             'response'      => $this->getResponseInfo($application->getResponse()),
  6.             'template'      => $this->getTemplateInfo($application->getTemplate(true)),
  7.             'database'      => $this->getDatabaseInfo($model->getInfo()),
  8.         ];
  9.     }
  10.     /**
  1.                 $request_variables
  2.             )
  3.         );
  4.         foreach ($this->collectors as $name => $collector) {
  5.             $this->data[$name] = $collector->collect();
  6.         }
  7.         // Remove all invalid (non UTF-8) characters
  8.         array_walk_recursive($this->data, function (&$item) {
  9.                 if (is_string($item) && !mb_check_encoding($item'UTF-8')) {
  1.      * @return array
  2.      */
  3.     public function getData()
  4.     {
  5.         if ($this->data === null) {
  6.             $this->collect();
  7.         }
  8.         return $this->data;
  9.     }
  10.     /**
  1.                 $js .= $this->getAddDatasetCode($id$data'(stacked)');
  2.             }
  3.         }
  4.         $suffix = !$initialize '(ajax)' null;
  5.         $js .= $this->getAddDatasetCode($this->debugBar->getCurrentRequestId(), $this->debugBar->getData(), $suffix);
  6.         $nonce '';
  7.         if ($doc->cspNonce) {
  8.             $nonce ' nonce="' $doc->cspNonce '"';
  1.             echo $contents;
  2.             return;
  3.         }
  4.         echo str_replace('</body>'$debugBarRenderer->renderHead() . $debugBarRenderer->render() . '</body>'$contents);
  5.     }
  6.     /**
  7.      * AJAX handler
  8.      *
  1.                 if ($event->isStopped())
  2.                 {
  3.                     return $event;
  4.                 }
  5.                 $listener($event);
  6.             }
  7.         }
  8.         return $event;
  9.     }
Dispatcher->dispatch('onAfterRespond', object(Event)) in /home/websitesunlcom/public_html/create/libraries/src/Application/EventAware.php (line 111)
  1.             $event     = new $className($eventName$args);
  2.         } else {
  3.             throw new \InvalidArgumentException('The arguments must either be an event or an array');
  4.         }
  5.         $result $dispatcher->dispatch($eventName$event);
  6.         // @todo - There are still test cases where the result isn't defined, temporarily leave the isset check in place
  7.         return !isset($result['result']) || \is_null($result['result']) ? [] : $result['result'];
  8.     }
  9. }
WebApplication->triggerEvent('onAfterRespond') in /home/websitesunlcom/public_html/create/plugins/system/cache/src/Extension/Cache.php (line 180)
  1.             if ($this->profiler) {
  2.                 $this->profiler->mark('afterCache');
  3.             }
  4.             $this->getApplication()->triggerEvent('onAfterRespond');
  5.         }
  6.         // Closes the application.
  7.         $this->getApplication()->close();
  8.     }
  1.                 if ($event->isStopped())
  2.                 {
  3.                     return $event;
  4.                 }
  5.                 $listener($event);
  6.             }
  7.         }
  8.         return $event;
  9.     }
Dispatcher->dispatch('onAfterRoute', object(Event)) in /home/websitesunlcom/public_html/create/libraries/src/Application/EventAware.php (line 111)
  1.             $event     = new $className($eventName$args);
  2.         } else {
  3.             throw new \InvalidArgumentException('The arguments must either be an event or an array');
  4.         }
  5.         $result $dispatcher->dispatch($eventName$event);
  6.         // @todo - There are still test cases where the result isn't defined, temporarily leave the isset check in place
  7.         return !isset($result['result']) || \is_null($result['result']) ? [] : $result['result'];
  8.     }
  9. }
WebApplication->triggerEvent('onAfterRoute') in /home/websitesunlcom/public_html/create/libraries/src/Application/SiteApplication.php (line 790)
  1.             $this->input->def($key$value);
  2.         }
  3.         // Trigger the onAfterRoute event.
  4.         PluginHelper::importPlugin('system');
  5.         $this->triggerEvent('onAfterRoute');
  6.         $Itemid $this->input->getInt('Itemid'null);
  7.         $this->authorise($Itemid);
  8.     }
  1.         // Mark afterInitialise in the profiler.
  2.         JDEBUG $this->profiler->mark('afterInitialise') : null;
  3.         // Route the application
  4.         $this->route();
  5.         // Mark afterRoute in the profiler.
  6.         JDEBUG $this->profiler->mark('afterRoute') : null;
  7.         if (!$this->isHandlingMultiFactorAuthentication()) {
  1.             $this->sanityCheckSystemVariables();
  2.             $this->setupLogging();
  3.             $this->createExtensionNamespaceMap();
  4.             // Perform application routines.
  5.             $this->doExecute();
  6.             // If we have an application document object, render it.
  7.             if ($this->document instanceof \Joomla\CMS\Document\Document) {
  8.                 // Render the application output.
  9.                 $this->render();
CMSApplication->execute() in /home/websitesunlcom/public_html/create/includes/app.php (line 61)
  1. // Set the application as global app
  2. \Joomla\CMS\Factory::$application $app;
  3. // Execute the application.
  4. $app->execute();
require_once('/home/websitesunlcom/public_html/create/includes/app.php') in /home/websitesunlcom/public_html/create/index.php (line 32)
  1.  * define() is used rather than "const" to not error for PHP 5.2 and lower
  2.  */
  3. define('_JEXEC'1);
  4. // Run the application - All executable code should be triggered through this file
  5. require_once dirname(__FILE__) . '/includes/app.php';

Stack Traces 2

[2/2] Error
Error:
mysqli object is not fully initialized

  at /home/websitesunlcom/public_html/create/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:429
  at mysqli->real_escape_string('template')
     (/home/websitesunlcom/public_html/create/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:429)
  at Joomla\Database\Mysqli\MysqliDriver->escape('template')
     (/home/websitesunlcom/public_html/create/libraries/vendor/joomla/database/src/DatabaseDriver.php:1550)
  at Joomla\Database\DatabaseDriver->quote('template')
     (/home/websitesunlcom/public_html/create/administrator/components/com_templates/src/Model/StyleModel.php:767)
  at Joomla\Component\Templates\Administrator\Model\StyleModel->getSiteTemplates()
     (/home/websitesunlcom/public_html/create/libraries/src/Application/SiteApplication.php:453)
  at Joomla\CMS\Application\SiteApplication->getTemplate(true)
     (/home/websitesunlcom/public_html/create/libraries/src/Error/Renderer/HtmlRenderer.php:50)
  at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(mysqli_sql_exception))
     (/home/websitesunlcom/public_html/create/libraries/src/Exception/ExceptionHandler.php:126)
  at Joomla\CMS\Exception\ExceptionHandler::render(object(mysqli_sql_exception))
     (/home/websitesunlcom/public_html/create/libraries/src/Exception/ExceptionHandler.php:72)
  at Joomla\CMS\Exception\ExceptionHandler::handleException(object(mysqli_sql_exception))
     (/home/websitesunlcom/public_html/create/libraries/src/Application/CMSApplication.php:322)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/home/websitesunlcom/public_html/create/includes/app.php:61)
  at require_once('/home/websitesunlcom/public_html/create/includes/app.php')
     (/home/websitesunlcom/public_html/create/index.php:32)                
[1/2] mysqli_sql_exception
mysqli_sql_exception:
Too many connections

  at /home/websitesunlcom/public_html/create/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:309
  at mysqli->real_connect('localhost', 'websitesunlcom_create', object(SensitiveParameterValue), null, 3306, null, 0)
     (/home/websitesunlcom/public_html/create/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:309)
  at Joomla\Database\Mysqli\MysqliDriver->connect()
     (/home/websitesunlcom/public_html/create/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:427)
  at Joomla\Database\Mysqli\MysqliDriver->escape('template')
     (/home/websitesunlcom/public_html/create/libraries/vendor/joomla/database/src/DatabaseDriver.php:1550)
  at Joomla\Database\DatabaseDriver->quote('template')
     (/home/websitesunlcom/public_html/create/administrator/components/com_templates/src/Model/StyleModel.php:767)
  at Joomla\Component\Templates\Administrator\Model\StyleModel->getSiteTemplates()
     (/home/websitesunlcom/public_html/create/libraries/src/Application/SiteApplication.php:453)
  at Joomla\CMS\Application\SiteApplication->getTemplate(true)
     (/home/websitesunlcom/public_html/create/plugins/system/debug/src/DataCollector/InfoCollector.php:135)
  at Joomla\Plugin\System\Debug\DataCollector\InfoCollector->collect()
     (/home/websitesunlcom/public_html/create/libraries/vendor/maximebf/debugbar/src/DebugBar/DebugBar.php:238)
  at DebugBar\DebugBar->collect()
     (/home/websitesunlcom/public_html/create/libraries/vendor/maximebf/debugbar/src/DebugBar/DebugBar.php:265)
  at DebugBar\DebugBar->getData()
     (/home/websitesunlcom/public_html/create/plugins/system/debug/src/JavascriptRenderer.php:119)
  at Joomla\Plugin\System\Debug\JavascriptRenderer->render()
     (/home/websitesunlcom/public_html/create/plugins/system/debug/src/Extension/Debug.php:368)
  at Joomla\Plugin\System\Debug\Extension\Debug->onAfterRespond(object(Event))
     (/home/websitesunlcom/public_html/create/libraries/vendor/joomla/event/src/Dispatcher.php:486)
  at Joomla\Event\Dispatcher->dispatch('onAfterRespond', object(Event))
     (/home/websitesunlcom/public_html/create/libraries/src/Application/EventAware.php:111)
  at Joomla\CMS\Application\WebApplication->triggerEvent('onAfterRespond')
     (/home/websitesunlcom/public_html/create/plugins/system/cache/src/Extension/Cache.php:180)
  at Joomla\Plugin\System\Cache\Extension\Cache->onAfterRoute(object(Event))
     (/home/websitesunlcom/public_html/create/libraries/vendor/joomla/event/src/Dispatcher.php:486)
  at Joomla\Event\Dispatcher->dispatch('onAfterRoute', object(Event))
     (/home/websitesunlcom/public_html/create/libraries/src/Application/EventAware.php:111)
  at Joomla\CMS\Application\WebApplication->triggerEvent('onAfterRoute')
     (/home/websitesunlcom/public_html/create/libraries/src/Application/SiteApplication.php:790)
  at Joomla\CMS\Application\SiteApplication->route()
     (/home/websitesunlcom/public_html/create/libraries/src/Application/SiteApplication.php:232)
  at Joomla\CMS\Application\SiteApplication->doExecute()
     (/home/websitesunlcom/public_html/create/libraries/src/Application/CMSApplication.php:293)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/home/websitesunlcom/public_html/create/includes/app.php:61)
  at require_once('/home/websitesunlcom/public_html/create/includes/app.php')
     (/home/websitesunlcom/public_html/create/index.php:32)