mysqli_sql_exception

HTTP 500 Whoops, looks like something went wrong.

MySQL server has gone away

Exception

mysqli_sql_exception

  1.         $this->connection   = $connection;
  2.         $this->query        = $query;
  3.         $query = $this->prepareParameterKeyMapping($query);
  4.         $this->statement  = $connection->prepare($query);
  5.         if (!$this->statement)
  6.         {
  7.             throw new PrepareStatementFailureException($this->connection->error, $this->connection->errno);
  8.         }
  1.         $this->connection   = $connection;
  2.         $this->query        = $query;
  3.         $query = $this->prepareParameterKeyMapping($query);
  4.         $this->statement  = $connection->prepare($query);
  5.         if (!$this->statement)
  6.         {
  7.             throw new PrepareStatementFailureException($this->connection->error, $this->connection->errno);
  8.         }
  1.      * @since   2.0.0
  2.      * @throws  PrepareStatementFailureException
  3.      */
  4.     protected function prepareStatement(string $query): StatementInterface
  5.     {
  6.         return new MysqliStatement($this->connection, $query);
  7.     }
  8.     /**
  9.      * Unlocks tables in the database.
  10.      *
  1.         $query->setLimit($limit, $offset);
  2.         $sql = $this->replacePrefix((string) $query);
  3.         $this->statement = $this->prepareStatement($sql);
  4.         $this->sql    = $query;
  5.         $this->limit  = (int) max(0, $limit);
  6.         $this->offset = (int) max(0, $offset);
  1.      */
  2.     public function isConnectionEncryptionSupported(): bool
  3.     {
  4.         $this->connect();
  5.         $variables = $this->setQuery('SHOW SESSION VARIABLES WHERE `Variable_name` IN (\'have_ssl\')')->loadObjectList('Variable_name');
  6.         return !empty($variables['have_ssl']->Value) && $variables['have_ssl']->Value === 'YES';
  7.     }
  8.     /**
  1.             'dbserver'               => $db->getServerType(),
  2.             'dbversion'              => $db->getVersion(),
  3.             'dbcollation'            => $db->getCollation(),
  4.             'dbconnectioncollation'  => $db->getConnectionCollation(),
  5.             'dbconnectionencryption' => $db->getConnectionEncryption(),
  6.             'dbconnencryptsupported' => $db->isConnectionEncryptionSupported(),
  7.             'phpversion'             => PHP_VERSION,
  8.             'server'                 => $_SERVER['SERVER_SOFTWARE'] ?? getenv('SERVER_SOFTWARE'),
  9.             'sapi_name'              => PHP_SAPI,
  10.             'version'                => (new Version())->getLongVersion(),
  11.             'useragent'              => $_SERVER['HTTP_USER_AGENT'] ?? '',
  1.             'joomlaVersion' => JVERSION,
  2.             'requestId'     => $this->requestId,
  3.             'identity'      => $this->getIdentityInfo($application->getIdentity()),
  4.             'response'      => $this->getResponseInfo($application->getResponse()),
  5.             'template'      => $this->getTemplateInfo($application->getTemplate(true)),
  6.             'database'      => $this->getDatabaseInfo($model->getInfo()),
  7.         ];
  8.     }
  9.     /**
  10.      * Get Identity info.
  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.     }
  1.         // Send the application response.
  2.         $this->respond();
  3.         // Trigger the onAfterRespond event.
  4.         $this->getDispatcher()->dispatch('onAfterRespond');
  5.     }
  6.     /**
  7.      * Check if the user is required to reset their password.
  8.      *
CMSApplication->execute() in /home/gazetacom/public_html/site2026/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/gazetacom/public_html/site2026/includes/app.php') in /home/gazetacom/public_html/site2026/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 Trace

mysqli_sql_exception
mysqli_sql_exception:
MySQL server has gone away

  at /home/gazetacom/public_html/site2026/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137
  at mysqli->prepare('SHOW SESSION VARIABLES WHERE `Variable_name` IN (\'have_ssl\')')
     (/home/gazetacom/public_html/site2026/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137)
  at Joomla\Database\Mysqli\MysqliStatement->__construct(object(mysqli), 'SHOW SESSION VARIABLES WHERE `Variable_name` IN (\'have_ssl\')')
     (/home/gazetacom/public_html/site2026/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:1089)
  at Joomla\Database\Mysqli\MysqliDriver->prepareStatement('SHOW SESSION VARIABLES WHERE `Variable_name` IN (\'have_ssl\')')
     (/home/gazetacom/public_html/site2026/libraries/vendor/joomla/database/src/DatabaseDriver.php:1912)
  at Joomla\Database\DatabaseDriver->setQuery(object(MysqliQuery))
     (/home/gazetacom/public_html/site2026/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:548)
  at Joomla\Database\Mysqli\MysqliDriver->isConnectionEncryptionSupported()
     (/home/gazetacom/public_html/site2026/administrator/components/com_admin/src/Model/SysinfoModel.php:319)
  at Joomla\Component\Admin\Administrator\Model\SysinfoModel->getInfo()
     (/home/gazetacom/public_html/site2026/plugins/system/debug/src/DataCollector/InfoCollector.php:136)
  at Joomla\Plugin\System\Debug\DataCollector\InfoCollector->collect()
     (/home/gazetacom/public_html/site2026/libraries/vendor/maximebf/debugbar/src/DebugBar/DebugBar.php:238)
  at DebugBar\DebugBar->collect()
     (/home/gazetacom/public_html/site2026/libraries/vendor/maximebf/debugbar/src/DebugBar/DebugBar.php:265)
  at DebugBar\DebugBar->getData()
     (/home/gazetacom/public_html/site2026/plugins/system/debug/src/JavascriptRenderer.php:119)
  at Joomla\Plugin\System\Debug\JavascriptRenderer->render()
     (/home/gazetacom/public_html/site2026/plugins/system/debug/src/Extension/Debug.php:368)
  at Joomla\Plugin\System\Debug\Extension\Debug->onAfterRespond(object(Event))
     (/home/gazetacom/public_html/site2026/libraries/vendor/joomla/event/src/Dispatcher.php:486)
  at Joomla\Event\Dispatcher->dispatch('onAfterRespond')
     (/home/gazetacom/public_html/site2026/libraries/src/Application/CMSApplication.php:332)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/home/gazetacom/public_html/site2026/includes/app.php:61)
  at require_once('/home/gazetacom/public_html/site2026/includes/app.php')
     (/home/gazetacom/public_html/site2026/index.php:32)