UnsupportedAdapterException UndefinedFunctionError

HTTP 500 Whoops, looks like something went wrong.

Attempted to call function "simplexml_load_file" from namespace "Joomla\CMS\Language".

Exceptions 2

Symfony\Component\ErrorHandler\Error\ UndefinedFunctionError

  1.         if (!is_readable($path)) {
  2.             throw new \RuntimeException('File not found or not readable');
  3.         }
  4.         // Try to load the file
  5.         $xml simplexml_load_file($path);
  6.         if (!$xml) {
  7.             return;
  8.         }
LanguageHelper::parseXMLLanguageFile() in /var/www/website/libraries/src/Language/LanguageHelper.php (line 513)
  1.         }
  2.         $result null;
  3.         if (is_file($file)) {
  4.             $result self::parseXMLLanguageFile($file);
  5.         }
  6.         if (empty($result)) {
  7.             return;
  8.         }
LanguageHelper::getMetadata() in /var/www/website/libraries/src/Language/Language.php (line 195)
  1.         if ($lang == null) {
  2.             $lang $this->default;
  3.         }
  4.         $this->lang $lang;
  5.         $this->metadata LanguageHelper::getMetadata($this->lang);
  6.         $this->setDebug($debug);
  7.         /*
  8.          * Let's load the default override once, so we can profit from that, too
  9.          * But make sure, that we don't enforce it on each language file load.
  1.      *
  2.      * @since   4.0.0
  3.      */
  4.     public function createLanguage($lang$debug false): Language
  5.     {
  6.         return new Language($lang$debug);
  7.     }
  8. }
LanguageFactory->createLanguage() in /var/www/website/libraries/src/Language/CachingLanguageFactory.php (line 45)
  1.      * @since   4.0.0
  2.      */
  3.     public function createLanguage($lang$debug false): Language
  4.     {
  5.         if (!isset(self::$languages[$lang $debug])) {
  6.             self::$languages[$lang $debug] = parent::createLanguage($lang$debug);
  7.         }
  8.         return self::$languages[$lang $debug];
  9.     }
  10. }
CachingLanguageFactory->createLanguage() in /var/www/website/libraries/src/Factory.php (line 716)
  1.         );
  2.         $conf self::getConfig();
  3.         $locale $conf->get('language');
  4.         $debug $conf->get('debug_lang');
  5.         $lang self::getContainer()->get(LanguageFactoryInterface::class)->createLanguage($locale$debug);
  6.         return $lang;
  7.     }
  8.     /**
Factory::createLanguage() in /var/www/website/libraries/src/Factory.php (line 275)
  1.             ),
  2.             E_USER_DEPRECATED
  3.         );
  4.         if (!self::$language) {
  5.             self::$language self::createLanguage();
  6.         }
  7.         return self::$language;
  8.     }
Factory::getLanguage() in /var/www/website/libraries/src/Menu/SiteMenu.php (line 72)
  1.      */
  2.     public function __construct($options = array())
  3.     {
  4.         // Extract the internal dependencies before calling the parent constructor since it calls $this->load()
  5.         $this->app      = isset($options['app']) && $options['app'] instanceof CMSApplication $options['app'] : Factory::getApplication();
  6.         $this->language = isset($options['language']) && $options['language'] instanceof Language $options['language'] : Factory::getLanguage();
  7.         if (!isset($options['db']) || !($options['db'] instanceof DatabaseDriver)) {
  8.             @trigger_error(sprintf('Database will be mandatory in 5.0.'), E_USER_DEPRECATED);
  9.             $options['db'] = Factory::getContainer()->get(DatabaseDriver::class);
  10.         }
SiteMenu->__construct() in /var/www/website/libraries/src/Menu/MenuFactory.php (line 55)
  1.         if (!array_key_exists('db'$options)) {
  2.             $options['db'] = $this->getDatabase();
  3.         }
  4.         $instance = new $classname($options);
  5.         if ($instance instanceof CacheControllerFactoryAwareInterface) {
  6.             $instance->setCacheControllerFactory($this->getCacheControllerFactory());
  7.         }
  1.         if ($this->menuFactory === null) {
  2.             @trigger_error('Menu factory must be set in 5.0'E_USER_DEPRECATED);
  3.             $this->menuFactory $this->getContainer()->get(MenuFactoryInterface::class);
  4.         }
  5.         $this->menus[$name] = $this->menuFactory->createMenu($name$options);
  6.         // Make sure the abstract menu has the instance too, is needed for BC and will be removed with version 5
  7.         AbstractMenu::$instances[$name] = $this->menus[$name];
  8.         return $this->menus[$name];
  1.             return $this->template->template;
  2.         }
  3.         // Get the id of the active menu item
  4.         $menu $this->getMenu();
  5.         $item $menu->getActive();
  6.         if (!$item) {
  7.             $item $menu->getItem($this->input->getInt('Itemid'null));
  8.         }
SiteApplication->getTemplate() in /var/www/website/libraries/src/Error/Renderer/HtmlRenderer.php (line 50)
  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
  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.             }
  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() in /var/www/website/libraries/src/Application/CMSApplication.php (line 323)
  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 /var/www/website/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('/var/www/website/includes/app.php') in /var/www/website/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\ UnsupportedAdapterException

The MySQLi extension is not available

  1.         }
  2.         // Make sure the MySQLi extension for PHP is installed and enabled.
  3.         if (!static::isSupported())
  4.         {
  5.             throw new UnsupportedAdapterException('The MySQLi extension is not available');
  6.         }
  7.         /*
  8.          * Unlike mysql_connect(), mysqli_connect() takes the port and socket as separate arguments. Therefore, we
  9.          * have to extract them from the host string.
  1.      * @since   2.0.0
  2.      */
  3.     #[\ReturnTypeWillChange]
  4.     public function open($save_path$session_id)
  5.     {
  6.         $this->db->connect();
  7.         return true;
  8.     }
  9.     /**
DatabaseHandler->open()
  1.             throw new \RuntimeException(
  2.                 sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.'$file$line)
  3.             );
  4.         }
  5.         if (!session_start())
  6.         {
  7.             throw new \RuntimeException('Failed to start the session');
  8.         }
  9.         $this->isActive();
  1.                 $this->setId($session_clean);
  2.                 $cookie->set($session_name''time() - 3600);
  3.             }
  4.         }
  5.         parent::start();
  6.         // Try loading data from the session
  7.         if (isset($_SESSION['joomla']) && !empty($_SESSION['joomla'])) {
  8.             $this->data unserialize(base64_decode($_SESSION['joomla']));
  9.         }
  1.         if ($this->isStarted())
  2.         {
  3.             return;
  4.         }
  5.         $this->store->start();
  6.         $this->setState(SessionState::ACTIVE);
  7.         // Initialise the session
  8.         $this->setCounter();
  1.      */
  2.     public function has($name)
  3.     {
  4.         if (!$this->isActive())
  5.         {
  6.             $this->start();
  7.         }
  8.         return $this->store->has($name);
  9.     }
  1.                 $name $args[2] . '.' $name;
  2.             }
  3.         }
  4.         if (parent::has($name)) {
  5.             // Parent is used because of b/c, can be changed in Joomla 5
  6.             return parent::get($name$default);
  7.         }
  8.         /*
  1.                 __CLASS__
  2.             ),
  3.             E_USER_DEPRECATED
  4.         );
  5.         $instance self::getApplication()->getSession()->get('user');
  6.         if (\is_null($id)) {
  7.             if (!($instance instanceof User)) {
  8.                 $instance User::getInstance();
  9.             }
  1.      *
  2.      * @since   3.2
  3.      */
  4.     protected function initialiseApp($options = array())
  5.     {
  6.         $user Factory::getUser();
  7.         // If the user is a guest we populate it with the guest user group.
  8.         if ($user->guest) {
  9.             $guestUsergroup ComponentHelper::getParams('com_users')->get('guest_usergroup'1);
  10.             $user->groups = array($guestUsergroup);
SiteApplication->initialiseApp() in /var/www/website/libraries/src/Application/SiteApplication.php (line 218)
  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
SiteApplication->doExecute() in /var/www/website/libraries/src/Application/CMSApplication.php (line 294)
  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 /var/www/website/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('/var/www/website/includes/app.php') in /var/www/website/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] UndefinedFunctionError
Symfony\Component\ErrorHandler\Error\UndefinedFunctionError:
Attempted to call function "simplexml_load_file" from namespace "Joomla\CMS\Language".

  at /var/www/website/libraries/src/Language/LanguageHelper.php:611
  at Joomla\CMS\Language\LanguageHelper::parseXMLLanguageFile()
     (/var/www/website/libraries/src/Language/LanguageHelper.php:513)
  at Joomla\CMS\Language\LanguageHelper::getMetadata()
     (/var/www/website/libraries/src/Language/Language.php:195)
  at Joomla\CMS\Language\Language->__construct()
     (/var/www/website/libraries/src/Language/LanguageFactory.php:35)
  at Joomla\CMS\Language\LanguageFactory->createLanguage()
     (/var/www/website/libraries/src/Language/CachingLanguageFactory.php:45)
  at Joomla\CMS\Language\CachingLanguageFactory->createLanguage()
     (/var/www/website/libraries/src/Factory.php:716)
  at Joomla\CMS\Factory::createLanguage()
     (/var/www/website/libraries/src/Factory.php:275)
  at Joomla\CMS\Factory::getLanguage()
     (/var/www/website/libraries/src/Menu/SiteMenu.php:72)
  at Joomla\CMS\Menu\SiteMenu->__construct()
     (/var/www/website/libraries/src/Menu/MenuFactory.php:55)
  at Joomla\CMS\Menu\MenuFactory->createMenu()
     (/var/www/website/libraries/src/Application/CMSApplication.php:519)
  at Joomla\CMS\Application\CMSApplication->getMenu()
     (/var/www/website/libraries/src/Application/SiteApplication.php:408)
  at Joomla\CMS\Application\SiteApplication->getTemplate()
     (/var/www/website/libraries/src/Error/Renderer/HtmlRenderer.php:50)
  at Joomla\CMS\Error\Renderer\HtmlRenderer->render()
     (/var/www/website/libraries/src/Exception/ExceptionHandler.php:121)
  at Joomla\CMS\Exception\ExceptionHandler::render()
     (/var/www/website/libraries/src/Exception/ExceptionHandler.php:72)
  at Joomla\CMS\Exception\ExceptionHandler::handleException()
     (/var/www/website/libraries/src/Application/CMSApplication.php:323)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/var/www/website/includes/app.php:61)
  at require_once('/var/www/website/includes/app.php')
     (/var/www/website/index.php:32)                
[1/2] UnsupportedAdapterException
Joomla\Database\Exception\UnsupportedAdapterException:
The MySQLi extension is not available

  at /var/www/website/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:161
  at Joomla\Database\Mysqli\MysqliDriver->connect()
     (/var/www/website/libraries/vendor/joomla/session/src/Handler/DatabaseHandler.php:233)
  at Joomla\Session\Handler\DatabaseHandler->open()
  at session_start()
     (/var/www/website/libraries/vendor/joomla/session/src/Storage/NativeStorage.php:478)
  at Joomla\Session\Storage\NativeStorage->start()
     (/var/www/website/libraries/src/Session/Storage/JoomlaStorage.php:295)
  at Joomla\CMS\Session\Storage\JoomlaStorage->start()
     (/var/www/website/libraries/vendor/joomla/session/src/Session.php:406)
  at Joomla\Session\Session->start()
     (/var/www/website/libraries/vendor/joomla/session/src/Session.php:333)
  at Joomla\Session\Session->has()
     (/var/www/website/libraries/src/Session/Session.php:191)
  at Joomla\CMS\Session\Session->get()
     (/var/www/website/libraries/src/Factory.php:334)
  at Joomla\CMS\Factory::getUser()
     (/var/www/website/libraries/src/Application/SiteApplication.php:552)
  at Joomla\CMS\Application\SiteApplication->initialiseApp()
     (/var/www/website/libraries/src/Application/SiteApplication.php:218)
  at Joomla\CMS\Application\SiteApplication->doExecute()
     (/var/www/website/libraries/src/Application/CMSApplication.php:294)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/var/www/website/includes/app.php:61)
  at require_once('/var/www/website/includes/app.php')
     (/var/www/website/index.php:32)