'Invalid DB driver' error when connecting CodeIgniter framework to Sql Server - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: 'Invalid DB driver' error when connecting CodeIgniter framework to Sql Server (/showthread.php?tid=71808) |
'Invalid DB driver' error when connecting CodeIgniter framework to Sql Server - Ann - 09-26-2018 This is the error: Quote:An Error Was Encountered. I am using CodeIgniter 3.1.9 framework for a website and I am on the process of connecting the database I imported on HeidiSQL to the framework. To connect to the database, I decided to install sql server drivers for the specific php version I have (PHP 7.2.9). By the way, I have Microsoft SQL Server 2012 Native Client installed and my operative system is a Windows 7 Professional 64 bits. I created a folder inside CodeIgniter named 'sqlsrv' and installed the drivers inside. I configured php.ini file like this, adding the extensions needed: Code: extension=sqlsrv And here is the database.php configuration file (server/hostname, port, username, database/dbname and password values are not real for safety): Code: $active_group = 'default'; I tried changing the content inside 'dsn' value, enabling more sql server drivers and infinite other ways like using odb (not useful because query builder is not allowed) alternatively and it's still not working. How can I solve this? And is a good practice to choose sql server driver for the specs I mentioned? RE: 'Invalid DB driver' error when connecting CodeIgniter framework to Sql Server - snelledre - 09-26-2018 First do you use mssql express? I use Codeigniter with sqlserver express 2014 and 2012 with iis 7 with no problems. This is my database config: Code: $active_group = 'default'; Look also if the drivers are loaded in de PHP.ini . Good luck Andre |