No connection could be made because the target machine actively refused it

Installed CakePHP on IIS 8.5 with PHP 7.4.6 and MSSQL extensions loaded as
extension=php_pdo_sqlsrv_74_nts_x64.dll

Running my own little testscript for PDO connections to MSSQL Server works. I can connect and I can retrieve data. However CakePHP cannot connect using the same server, database and credentials. Both CakePHP and my test script runs on the same server and under the same site. The error received from CakePHP is:

CakePHP is NOT able to connect to the database.
Connection to Sqlserver could not be established: SQLSTATE[08001]: [Microsoft][ODBC Driver 11 for SQL Server]TCP Provider: No connection could be made because the target machine actively refused it.

Any one else had the same issues?

Ok found the issue. There is an app_local.php that overwrite the settings in app.php. Corrected that file and now I have database access. However the setup instructions do not mention altering the app_php.local it just states " If you have config/app_local.php in your app folder, it overrides app.php configuration."

So I guess it was my own fault not reading that properly.