Codeigniter 4 not working with sqlsrv |
Hey guys, I'm trying to connect codeigniter 4 with sqlsrv driver, but it's not working. I'm using wamp server 64. I did all needed configurations.
a) I downloaded drivers for 7.4 php version and added the "extension=" lines in php.ini file for these two files (php_pdo_sqlsrv_74_ts_x64.dll, php_sqlsrv_74_ts_x64.dll). b) I checked the php_info and its everything ok. c) I did a test using the code below and it worked, but when I use the same setting in codeigniter 4, it doesn't work. PHP Code: $serverName = "DSSQLM01"; //serverName\instanceName, portNumber (default is 1433) ## setting in codeigniter 4 PHP Code: public $dw = [ ## Configurações ##
I want to ask you to test the following.
In the system/Database/SQLSRV/Connection.php file, add a backslash to the beginning of all functions starting with sqlsrv_. Like this sqlsrv_configure => \sqlsrv_configure And then try to connect to the database. |
Welcome Guest, Not a member yet? Register Sign In |