CRITICAL - 2026-05-13 08:06:58 --> CodeIgniter\Database\Exceptions\DatabaseException: Unable to connect to the database.
Main connection [MySQLi]: No connection could be made because the target machine actively refused it
[Method: GET, Route: gallery]
in SYSTEMPATH\Database\BaseConnection.php on line 465.
 1 SYSTEMPATH\Database\BaseConnection.php(614): CodeIgniter\Database\BaseConnection->initialize()
 2 SYSTEMPATH\Database\BaseBuilder.php(1649): CodeIgniter\Database\BaseConnection->query('SELECT `gallery_items`.*, `user_profiles`.`username`, `user_profiles`.`profile_picture`, (SELECT COUNT(*) FROM favorites WHERE favorites.gallery_item_id = gallery_items.id) as favorite_count
FROM `gallery_items`
JOIN `user_profiles` ON `user_profiles`.`user_id` = `gallery_items`.`user_id`
ORDER BY `gallery_items`.`created_at` DESC', [], false)
 3 APPPATH\Controllers\GalleryController.php(134): CodeIgniter\Database\BaseBuilder->get()
 4 SYSTEMPATH\CodeIgniter.php(933): App\Controllers\GalleryController->index()
 5 SYSTEMPATH\CodeIgniter.php(507): CodeIgniter\CodeIgniter->runController(Object(App\Controllers\GalleryController))
 6 SYSTEMPATH\CodeIgniter.php(354): CodeIgniter\CodeIgniter->handleRequest(null, Object(Config\Cache), false)
 7 SYSTEMPATH\Boot.php(363): CodeIgniter\CodeIgniter->run()
 8 SYSTEMPATH\Boot.php(68): CodeIgniter\Boot::runCodeIgniter(Object(CodeIgniter\CodeIgniter))
 9 FCPATH\index.php(59): CodeIgniter\Boot::bootWeb(Object(Config\Paths))
10 SYSTEMPATH\rewrite.php(44): require_once('C:\\Users\\Adrians\\Documents\\Projects\\programming projects\\DiplomDarbs\\Art Portfolio\\project-root\\public\\index.php')
