I've got the following code in my Wordpress file:
$sql_server_2008 = sqlsrv_connect(
'$ip',
array(
'Database'=>'$database_name',
'UID'=>'$uid',
'PWD'=>'$password'
)
);
and I'm getting the following error:
Fatal error: Call to undefined function sqlsrv_connect()
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:
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
and they're showing as active in the Wamp UI:
So why isn't it working?
EDIT: They're not showing up in loaded extensions.
$extensions = get_loaded_extensions ();
print_r($extensions);
Returns:
Array ( [0] => Core [1] => bcmath [2] => calendar [3] => ctype [4] => date [5] => ereg [6] => filter [7] => ftp [8] => hash [9] => iconv [10] => json [11] => mcrypt [12] => SPL [13] => odbc [14] => pcre [15] => Reflection [16] => session [17] => standard [18] => mysqlnd [19] => tokenizer [20] => zip [21] => zlib [22] => libxml [23] => dom [24] => PDO [25] => bz2 [26] => SimpleXML [27] => wddx [28] => xml [29] => xmlreader [30] => xmlwriter [31] => apache2handler [32] => Phar [33] => curl [34] => com_dotnet [35] => fileinfo [36] => gd [37] => gettext [38] => gmp [39] => intl [40] => imap [41] => ldap [42] => mbstring [43] => exif [44] => mysql [45] => mysqli [46] => pdo_mysql [47] => pdo_sqlite [48] => soap [49] => sockets [50] => sqlite3 [51] => xmlrpc [52] => xsl [53] => mhash [54] => Zend OPcache [55] => xdebug )