You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which operating systems have you tested for this bug?
Windows
Which server did you use?
cli-server (PHP built-in webserver)
Database
SQL Server 2019
What happened?
Database doesn't connect using non default SQL Server port, which is 1433 is default port. Especially when we connect to other machine (over network) instead of our local. Configuration database.default.port = (in .env) or $config['default']['port'] = (in config) didn't give any effect, not worked.
If we use local db, whatever port that use in the server db, the connection still work. But the problem comes if we connect other machine in the network.
In the Connection.php class under /vendor/codeigniter4/framework/system/Database/SQLSRV there are
PHP Version
7.4
CodeIgniter4 Version
4.0
CodeIgniter4 Installation Method
Composer (using
codeigniter4/appstarter
)Which operating systems have you tested for this bug?
Windows
Which server did you use?
cli-server (PHP built-in webserver)
Database
SQL Server 2019
What happened?
Database doesn't connect using non default SQL Server port, which is 1433 is default port. Especially when we connect to other machine (over network) instead of our local. Configuration
database.default.port =
(in .env) or$config['default']['port'] =
(in config) didn't give any effect, not worked.If we use local db, whatever port that use in the server db, the connection still work. But the problem comes if we connect other machine in the network.
In the
Connection.php
class under/vendor/codeigniter4/framework/system/Database/SQLSRV
there arethen I modified like this
it solved the problem
Steps to Reproduce
Expected Output
Connection to db works as same like using default port
Anything else?
I tried to modify this class under
/vendor/codeigniter4/framework/system/Database/SQLSRV/Connection.php
from this
to this
How to override this class in our library, without directly modify like that.
Thank you.
The text was updated successfully, but these errors were encountered: