ERROR - 2025-11-03 19:10:09 --> Error connecting to the database: mysqli_sql_exception: No connection could be made because the target machine actively refused it in C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Database\MySQLi\Connection.php:201
Stack trace:
#0 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Database\MySQLi\Connection.php(201): mysqli->real_connect('localhost', 'root', Object(SensitiveParameterValue), 'portfolio', 3306, '', 0)
#1 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Database\BaseConnection.php(419): CodeIgniter\Database\MySQLi\Connection->connect(false)
#2 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Database\BaseConnection.php(614): CodeIgniter\Database\BaseConnection->initialize()
#3 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Database\BaseBuilder.php(1649): CodeIgniter\Database\BaseConnection->query('SELECT *\nFROM `...', Array, false)
#4 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Model.php(286): CodeIgniter\Database\BaseBuilder->get()
#5 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\BaseModel.php(677): CodeIgniter\Model->doFindAll(0, 0)
#6 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\app\Models\NewsModel.php(14): CodeIgniter\BaseModel->findAll()
#7 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\app\Controllers\News.php(15): App\Models\NewsModel->getNews()
#8 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\CodeIgniter.php(933): App\Controllers\News->index()
#9 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\CodeIgniter.php(507): CodeIgniter\CodeIgniter->runController(Object(App\Controllers\News))
#10 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\CodeIgniter.php(354): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false)
#11 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Boot.php(363): CodeIgniter\CodeIgniter->run()
#12 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Boot.php(68): CodeIgniter\Boot::runCodeIgniter(Object(CodeIgniter\CodeIgniter))
#13 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\public\index.php(59): CodeIgniter\Boot::bootWeb(Object(Config\Paths))
#14 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\rewrite.php(44): require_once('C:\\Users\\Adrian...')
#15 {main}

Next CodeIgniter\Database\Exceptions\DatabaseException: No connection could be made because the target machine actively refused it in C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Database\MySQLi\Connection.php:246
Stack trace:
#0 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Database\BaseConnection.php(419): CodeIgniter\Database\MySQLi\Connection->connect(false)
#1 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Database\BaseConnection.php(614): CodeIgniter\Database\BaseConnection->initialize()
#2 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Database\BaseBuilder.php(1649): CodeIgniter\Database\BaseConnection->query('SELECT *\nFROM `...', Array, false)
#3 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Model.php(286): CodeIgniter\Database\BaseBuilder->get()
#4 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\BaseModel.php(677): CodeIgniter\Model->doFindAll(0, 0)
#5 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\app\Models\NewsModel.php(14): CodeIgniter\BaseModel->findAll()
#6 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\app\Controllers\News.php(15): App\Models\NewsModel->getNews()
#7 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\CodeIgniter.php(933): App\Controllers\News->index()
#8 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\CodeIgniter.php(507): CodeIgniter\CodeIgniter->runController(Object(App\Controllers\News))
#9 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\CodeIgniter.php(354): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false)
#10 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Boot.php(363): CodeIgniter\CodeIgniter->run()
#11 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\Boot.php(68): CodeIgniter\Boot::runCodeIgniter(Object(CodeIgniter\CodeIgniter))
#12 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\public\index.php(59): CodeIgniter\Boot::bootWeb(Object(Config\Paths))
#13 C:\Users\Adrians\Documents\Projects\programming projects\DiplomDarbs\project-root\vendor\codeigniter4\framework\system\rewrite.php(44): require_once('C:\\Users\\Adrian...')
#14 {main}
CRITICAL - 2025-11-03 19:10:09 --> 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: news]
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 *
FROM `news`', [], false)
 3 SYSTEMPATH\Model.php(286): CodeIgniter\Database\BaseBuilder->get()
 4 SYSTEMPATH\BaseModel.php(677): CodeIgniter\Model->doFindAll(0, 0)
 5 APPPATH\Models\NewsModel.php(14): CodeIgniter\BaseModel->findAll()
 6 APPPATH\Controllers\News.php(15): App\Models\NewsModel->getNews()
 7 SYSTEMPATH\CodeIgniter.php(933): App\Controllers\News->index()
 8 SYSTEMPATH\CodeIgniter.php(507): CodeIgniter\CodeIgniter->runController(Object(App\Controllers\News))
 9 SYSTEMPATH\CodeIgniter.php(354): CodeIgniter\CodeIgniter->handleRequest(null, Object(Config\Cache), false)
10 SYSTEMPATH\Boot.php(363): CodeIgniter\CodeIgniter->run()
11 SYSTEMPATH\Boot.php(68): CodeIgniter\Boot::runCodeIgniter(Object(CodeIgniter\CodeIgniter))
12 FCPATH\index.php(59): CodeIgniter\Boot::bootWeb(Object(Config\Paths))
13 SYSTEMPATH\rewrite.php(44): require_once('C:\\Users\\Adrians\\Documents\\Projects\\programming projects\\DiplomDarbs\\project-root\\public\\index.php')
DEBUG - 2025-11-03 19:30:51 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
INFO - 2025-11-03 19:31:20 --> CSRF token verified.
