title: "Call to undefined function sqlsrv_connect()" in Wamp, drivers installed
body: <p>I've got the following code in my Wordpress file:</p>
  
  <pre><code>$sql_server_2008 = sqlsrv_connect(
      '$ip',
      array(
          'Database'=&gt;'$database_name',
          'UID'=&gt;'$uid',
          'PWD'=&gt;'$password'
      )
  );
  </code></pre>
  
  <p>and I'm getting the following error:</p>
  
  <blockquote>
    <p>Fatal error: Call to undefined function sqlsrv_connect()</p>
  </blockquote>
  
  <p>I'm running Wamp with PHP 5.6.25, so I've installed the 5.6 versions of the SQL Server drivers. From PHP.ini:</p>
  
  <pre><code>extension=php_pdo_sqlsrv_56_nts.dll
  extension=php_pdo_sqlsrv_56_ts.dll
  extension=php_sqlsrv_56_nts.dll
  extension=php_sqlsrv_56_ts.dll
  </code></pre>
  
  <p>and they're showing as active in the Wamp UI:</p>
  
  <p><a href="https://i.stack.imgur.com/5zPmT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5zPmT.png" alt="Screenshot showing the active extensions"></a></p>
  
  <p>So why isn't it working?</p>
  
  <p><strong>EDIT: They're not showing up in loaded extensions.</strong></p>
  
  <pre><code>$extensions = get_loaded_extensions (); 
  print_r($extensions);
  </code></pre>
  
  <p>Returns:</p>
  
  <pre><code>Array ( [0] =&gt; Core [1] =&gt; bcmath [2] =&gt; calendar [3] =&gt; ctype [4] =&gt; date [5] =&gt; ereg [6] =&gt; filter [7] =&gt; ftp [8] =&gt; hash [9] =&gt; iconv [10] =&gt; json [11] =&gt; mcrypt [12] =&gt; SPL [13] =&gt; odbc [14] =&gt; pcre [15] =&gt; Reflection [16] =&gt; session [17] =&gt; standard [18] =&gt; mysqlnd [19] =&gt; tokenizer [20] =&gt; zip [21] =&gt; zlib [22] =&gt; libxml [23] =&gt; dom [24] =&gt; PDO [25] =&gt; bz2 [26] =&gt; SimpleXML [27] =&gt; wddx [28] =&gt; xml [29] =&gt; xmlreader [30] =&gt; xmlwriter [31] =&gt; apache2handler [32] =&gt; Phar [33] =&gt; curl [34] =&gt; com_dotnet [35] =&gt; fileinfo [36] =&gt; gd [37] =&gt; gettext [38] =&gt; gmp [39] =&gt; intl [40] =&gt; imap [41] =&gt; ldap [42] =&gt; mbstring [43] =&gt; exif [44] =&gt; mysql [45] =&gt; mysqli [46] =&gt; pdo_mysql [47] =&gt; pdo_sqlite [48] =&gt; soap [49] =&gt; sockets [50] =&gt; sqlite3 [51] =&gt; xmlrpc [52] =&gt; xsl [53] =&gt; mhash [54] =&gt; Zend OPcache [55] =&gt; xdebug )
  </code></pre>