Warning: mysqli::prepare(): invalid object or resource mysqli in /home4/cbalicom/public_html/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php on line 137
Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (111) (500 Whoops, looks like something went wrong.)

ConnectionFailureException PrepareStatementFailureException

HTTP 500 Whoops, looks like something went wrong.

Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (111)

Exceptions 2

Joomla\Database\Exception\ PrepareStatementFailureException

  1.         $this->statement  $connection->prepare($query);
  2.         if (!$this->statement)
  3.         {
  4.             throw new PrepareStatementFailureException($this->connection->error$this->connection->errno);
  5.         }
  6.     }
  7.     /**
  8.      * Replace named parameters with numbered parameters
  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);
DatabaseDriver->setQuery(object(MysqliQuery)) in /home4/cbalicom/public_html/libraries/src/Access/Access.php (line 952)
  1.             $query $db->getQuery(true)
  2.                 ->select($db->quoteName(['id''rules']))
  3.                 ->from($db->quoteName('#__viewlevels'));
  4.             // Set the query for execution.
  5.             $db->setQuery($query);
  6.             // Build the view levels array.
  7.             foreach ($db->loadAssocList() as $level) {
  8.                 self::$viewLevels[$level['id']] = (array) json_decode($level['rules']);
  9.             }
Access::getAuthorisedViewLevels(0) in /home4/cbalicom/public_html/libraries/src/User/User.php (line 445)
  1.         if ($this->_authLevels === null) {
  2.             $this->_authLevels = [];
  3.         }
  4.         if (empty($this->_authLevels)) {
  5.             $this->_authLevels Access::getAuthorisedViewLevels($this->id);
  6.         }
  7.         return $this->_authLevels;
  8.     }
User->getAuthorisedViewLevels() in /home4/cbalicom/public_html/libraries/src/Helper/ModuleHelper.php (line 394)
  1.      */
  2.     public static function getModuleList()
  3.     {
  4.         $app      Factory::getApplication();
  5.         $itemId   $app->getInput()->getInt('Itemid'0);
  6.         $groups   $app->getIdentity()->getAuthorisedViewLevels();
  7.         $clientId = (int) $app->getClientId();
  8.         // Build a cache ID for the resulting data object
  9.         $cacheId implode(','$groups) . '.' $clientId '.' $itemId;
  1.         $app->triggerEvent('onPrepareModuleList', [&$modules]);
  2.         // If the onPrepareModuleList event returns an array of modules, then ignore the default module list creation
  3.         if (!\is_array($modules)) {
  4.             $modules = static::getModuleList();
  5.         }
  6.         $app->triggerEvent('onAfterModuleList', [&$modules]);
  7.         $modules = static::cleanModuleList($modules);
  1.     public static function &getModules($position)
  2.     {
  3.         $position strtolower($position);
  4.         $result   = [];
  5.         $input    Factory::getApplication()->getInput();
  6.         $modules  = &static::load();
  7.         $total    = \count($modules);
  8.         for ($i 0$i $total$i++) {
  9.             if ($modules[$i]->position === $position) {
  10.                 $result[] = &$modules[$i];
  1.         $app          Factory::getApplication();
  2.         $user         Factory::getUser();
  3.         $frontediting = ($app->isClient('site') && $app->get('frontediting'1) && !$user->guest);
  4.         $menusEditing = ($app->get('frontediting'1) == 2) && $user->authorise('core.edit''com_menus');
  5.         foreach (ModuleHelper::getModules($position) as $mod) {
  6.             $moduleHtml $renderer->render($mod$params$content);
  7.             if ($frontediting && trim($moduleHtml) != '' && $user->authorise('module.edit.frontend''com_modules.module.' $mod->id)) {
  8.                 $displayData = ['moduleHtml' => &$moduleHtml'module' => $mod'position' => $position'menusediting' => $menusEditing];
  9.                 LayoutHelper::render('joomla.edit.frontediting_modules'$displayData);
ModulesRenderer->render('debug', array('name' => 'debug', 'style' => 'none'), null) in /home4/cbalicom/public_html/libraries/src/Document/HtmlDocument.php (line 565)
  1.             $cbuffer[$hash] = $tmpdata;
  2.             $cache->store($cbuffer'cbuffer_' $type);
  3.         } else {
  4.             $this->setBuffer($renderer->render($name$attribsnull), $type$name$title);
  5.         }
  6.         return parent::$_buffer[$type][$name][$title];
  7.     }
HtmlDocument->getBuffer('modules', 'debug', array('name' => 'debug', 'style' => 'none')) in /home4/cbalicom/public_html/libraries/src/Document/HtmlDocument.php (line 833)
  1.         $replace = [];
  2.         $with    = [];
  3.         foreach ($this->_template_tags as $jdoc => $args) {
  4.             $replace[] = $jdoc;
  5.             $with[]    = $this->getBuffer($args['type'], $args['name'], $args['attribs']);
  6.         }
  7.         return str_replace($replace$with$this->_template);
  8.     }
  9. }
HtmlDocument->_renderTemplate() in /home4/cbalicom/public_html/libraries/src/Document/HtmlDocument.php (line 637)
  1.         if (\array_key_exists('csp_nonce'$params) && $params['csp_nonce'] !== null) {
  2.             $this->cspNonce $params['csp_nonce'];
  3.         }
  4.         $data $this->_renderTemplate();
  5.         parent::render($caching$params);
  6.         return $data;
  7.     }
HtmlDocument->render(false, array('template' => 'shaper_helixultimate', 'directory' => '/home4/cbalicom/public_html/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) in /home4/cbalicom/public_html/libraries/src/Document/ErrorDocument.php (line 139)
  1.         $this->debug $params['debug'] ?? false;
  2.         $this->error $this->_error;
  3.         $params['file'] = 'error.php';
  4.         return parent::render($cache$params);
  5.     }
  6.     /**
  7.      * Render the backtrace
  8.      *
ErrorDocument->render(false, array('template' => 'shaper_helixultimate', 'directory' => '/home4/cbalicom/public_html/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) in /home4/cbalicom/public_html/libraries/src/Error/Renderer/HtmlRenderer.php (line 78)
  1.                 'template'         => $template->template,
  2.                 'directory'        => JPATH_THEMES,
  3.                 'debug'            => JDEBUG,
  4.                 'csp_nonce'        => $app->get('csp_nonce'),
  5.                 'templateInherits' => $template->parent,
  6.                 'params'           => $template->params,
  7.             ]
  8.         );
  9.     }
  10. }
HtmlRenderer->render(object(ConnectionFailureException)) in /home4/cbalicom/public_html/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(ConnectionFailureException)) in /home4/cbalicom/public_html/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(ConnectionFailureException)) in /home4/cbalicom/public_html/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 /home4/cbalicom/public_html/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('/home4/cbalicom/public_html/includes/app.php') in /home4/cbalicom/public_html/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';

Joomla\Database\Exception\ ConnectionFailureException

Could not connect to database: Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (111)

  1.             $connectionFlags
  2.         );
  3.         if (!$connected)
  4.         {
  5.             throw new ConnectionFailureException(
  6.                 'Could not connect to database: ' $this->connection->connect_error,
  7.                 $this->connection->connect_errno
  8.             );
  9.         }
  1.      * @since   1.0
  2.      * @throws  \InvalidArgumentException
  3.      */
  4.     public function setQuery($query$offset 0$limit 0)
  5.     {
  6.         $this->connect();
  7.         $this->freeResult();
  8.         if (\is_string($query))
  9.         {
DatabaseDriver->setQuery(object(MysqliQuery)) in /home4/cbalicom/public_html/libraries/src/Access/Access.php (line 952)
  1.             $query $db->getQuery(true)
  2.                 ->select($db->quoteName(['id''rules']))
  3.                 ->from($db->quoteName('#__viewlevels'));
  4.             // Set the query for execution.
  5.             $db->setQuery($query);
  6.             // Build the view levels array.
  7.             foreach ($db->loadAssocList() as $level) {
  8.                 self::$viewLevels[$level['id']] = (array) json_decode($level['rules']);
  9.             }
Access::getAuthorisedViewLevels(0) in /home4/cbalicom/public_html/libraries/src/User/User.php (line 445)
  1.         if ($this->_authLevels === null) {
  2.             $this->_authLevels = [];
  3.         }
  4.         if (empty($this->_authLevels)) {
  5.             $this->_authLevels Access::getAuthorisedViewLevels($this->id);
  6.         }
  7.         return $this->_authLevels;
  8.     }
User->getAuthorisedViewLevels() in /home4/cbalicom/public_html/libraries/src/Plugin/PluginHelper.php (line 258)
  1.     {
  2.         if (static::$plugins !== null) {
  3.             return static::$plugins;
  4.         }
  5.         $levels Factory::getUser()->getAuthorisedViewLevels();
  6.         /** @var \Joomla\CMS\Cache\Controller\CallbackController $cache */
  7.         $cache Factory::getCache('com_plugins''callback');
  8.         $loader = function () use ($levels) {
  1.      * @since   1.5
  2.      */
  3.     public static function getPlugin($type$plugin null)
  4.     {
  5.         $result  = [];
  6.         $plugins = static::load();
  7.         // Find the correct plugin(s) to return.
  8.         if (!$plugin) {
  9.             foreach ($plugins as $p) {
  10.                 // Is this the right plugin?
PluginHelper::getPlugin('system', 'languagefilter') in /home4/cbalicom/public_html/libraries/src/Application/SiteApplication.php (line 570)
  1.         if ($user->guest) {
  2.             $guestUsergroup ComponentHelper::getParams('com_users')->get('guest_usergroup'1);
  3.             $user->groups   = [$guestUsergroup];
  4.         }
  5.         if ($plugin PluginHelper::getPlugin('system''languagefilter')) {
  6.             $pluginParams = new Registry($plugin->params);
  7.             $this->setLanguageFilter(true);
  8.             $this->setDetectBrowser($pluginParams->get('detect_browser'1) == 1);
  9.         }
  1.      * @since   3.2
  2.      */
  3.     protected function doExecute()
  4.     {
  5.         // Initialise the application
  6.         $this->initialiseApp();
  7.         // Mark afterInitialise in the profiler.
  8.         JDEBUG $this->profiler->mark('afterInitialise') : null;
  9.         // Route the application
  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 /home4/cbalicom/public_html/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('/home4/cbalicom/public_html/includes/app.php') in /home4/cbalicom/public_html/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] PrepareStatementFailureException
Joomla\Database\Exception\PrepareStatementFailureException:
Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (111)

  at /home4/cbalicom/public_html/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:141
  at Joomla\Database\Mysqli\MysqliStatement->__construct(object(mysqli), 'SELECT `id`,`rules`FROM `j25_viewlevels`')
     (/home4/cbalicom/public_html/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:1089)
  at Joomla\Database\Mysqli\MysqliDriver->prepareStatement('SELECT `id`,`rules`FROM `j25_viewlevels`')
     (/home4/cbalicom/public_html/libraries/vendor/joomla/database/src/DatabaseDriver.php:1900)
  at Joomla\Database\DatabaseDriver->setQuery(object(MysqliQuery))
     (/home4/cbalicom/public_html/libraries/src/Access/Access.php:952)
  at Joomla\CMS\Access\Access::getAuthorisedViewLevels(0)
     (/home4/cbalicom/public_html/libraries/src/User/User.php:445)
  at Joomla\CMS\User\User->getAuthorisedViewLevels()
     (/home4/cbalicom/public_html/libraries/src/Helper/ModuleHelper.php:394)
  at Joomla\CMS\Helper\ModuleHelper::getModuleList()
     (/home4/cbalicom/public_html/libraries/src/Helper/ModuleHelper.php:373)
  at Joomla\CMS\Helper\ModuleHelper::load()
     (/home4/cbalicom/public_html/libraries/src/Helper/ModuleHelper.php:88)
  at Joomla\CMS\Helper\ModuleHelper::getModules('debug')
     (/home4/cbalicom/public_html/libraries/src/Document/Renderer/Html/ModulesRenderer.php:49)
  at Joomla\CMS\Document\Renderer\Html\ModulesRenderer->render('debug', array('name' => 'debug', 'style' => 'none'), null)
     (/home4/cbalicom/public_html/libraries/src/Document/HtmlDocument.php:565)
  at Joomla\CMS\Document\HtmlDocument->getBuffer('modules', 'debug', array('name' => 'debug', 'style' => 'none'))
     (/home4/cbalicom/public_html/libraries/src/Document/HtmlDocument.php:833)
  at Joomla\CMS\Document\HtmlDocument->_renderTemplate()
     (/home4/cbalicom/public_html/libraries/src/Document/HtmlDocument.php:637)
  at Joomla\CMS\Document\HtmlDocument->render(false, array('template' => 'shaper_helixultimate', 'directory' => '/home4/cbalicom/public_html/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
     (/home4/cbalicom/public_html/libraries/src/Document/ErrorDocument.php:139)
  at Joomla\CMS\Document\ErrorDocument->render(false, array('template' => 'shaper_helixultimate', 'directory' => '/home4/cbalicom/public_html/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
     (/home4/cbalicom/public_html/libraries/src/Error/Renderer/HtmlRenderer.php:78)
  at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(ConnectionFailureException))
     (/home4/cbalicom/public_html/libraries/src/Exception/ExceptionHandler.php:126)
  at Joomla\CMS\Exception\ExceptionHandler::render(object(ConnectionFailureException))
     (/home4/cbalicom/public_html/libraries/src/Exception/ExceptionHandler.php:72)
  at Joomla\CMS\Exception\ExceptionHandler::handleException(object(ConnectionFailureException))
     (/home4/cbalicom/public_html/libraries/src/Application/CMSApplication.php:322)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/home4/cbalicom/public_html/includes/app.php:61)
  at require_once('/home4/cbalicom/public_html/includes/app.php')
     (/home4/cbalicom/public_html/index.php:32)                
[1/2] ConnectionFailureException
Joomla\Database\Exception\ConnectionFailureException:
Could not connect to database: Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (111)

  at /home4/cbalicom/public_html/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:321
  at Joomla\Database\Mysqli\MysqliDriver->connect()
     (/home4/cbalicom/public_html/libraries/vendor/joomla/database/src/DatabaseDriver.php:1854)
  at Joomla\Database\DatabaseDriver->setQuery(object(MysqliQuery))
     (/home4/cbalicom/public_html/libraries/src/Access/Access.php:952)
  at Joomla\CMS\Access\Access::getAuthorisedViewLevels(0)
     (/home4/cbalicom/public_html/libraries/src/User/User.php:445)
  at Joomla\CMS\User\User->getAuthorisedViewLevels()
     (/home4/cbalicom/public_html/libraries/src/Plugin/PluginHelper.php:258)
  at Joomla\CMS\Plugin\PluginHelper::load()
     (/home4/cbalicom/public_html/libraries/src/Plugin/PluginHelper.php:109)
  at Joomla\CMS\Plugin\PluginHelper::getPlugin('system', 'languagefilter')
     (/home4/cbalicom/public_html/libraries/src/Application/SiteApplication.php:570)
  at Joomla\CMS\Application\SiteApplication->initialiseApp()
     (/home4/cbalicom/public_html/libraries/src/Application/SiteApplication.php:226)
  at Joomla\CMS\Application\SiteApplication->doExecute()
     (/home4/cbalicom/public_html/libraries/src/Application/CMSApplication.php:293)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/home4/cbalicom/public_html/includes/app.php:61)
  at require_once('/home4/cbalicom/public_html/includes/app.php')
     (/home4/cbalicom/public_html/index.php:32)