title: MSSQL SQLSVR Database Connection in PHP CodeIgniter
body: <p>I am having a problem I have been troubleshooting a while. I am trying to create a connection to a Microsoft SQL Server 2012 database to use in a CodeIgniter application. Upon running that model i get the error:</p>
  
  <pre><code>Fatal error: Call to undefined function sqlsrv_connect() in PATH\sqlsrv_driver.php on line 76
  </code></pre>
  
  <p>Here is the important section of my database configuration file:</p>
  
  <pre><code>$db['default']['hostname'] = 'HOST';
  $db['default']['username'] = 'UNAME';
  $db['default']['password'] = 'PWORD';
  $db['default']['database'] = 'DBASE';
  $db['default']['dbdriver'] = 'sqlsrv';
  </code></pre>
  
  <p>I have followed a couple of guides here on Stackoverflow and elsewhere from Google to download the drivers needed to start the connection. Right now,</p>
  
  <pre><code>php_pdo_sqlsrv_54_ts.dll
  php_sqlsrv_54_ts.dll
  </code></pre>
  
  <p>are in the php/ext folder and</p>
  
  <pre><code>extension=php_pdo_sqlsrv_54_ts.dll
  extension=php_sqlsrv_54_ts.dll
  </code></pre>
  
  <p>have been added to my php.ini file. I have the Microsoft SQL Native Client. Am I missing anything else here? This is driving me nuts.</p>
  
  <p>EDIT:
  A line in my php.ini file was miss typed but I am now presented with this error:</p>
  
  <p>A Database Error Occurred
  Unable to connect to your database server using the provided settings.
  Filename: C:\xampp\htdocs\report\system\database\DB_driver.php
  Line Number: 124</p>