I went through several questions and recommendation to resolve the above issue, but No luck at all.
I have the following settings:
Windows Server 2008 R2
x
ampp-win32-1.8.2-5-VC9-installer
SQLSRV30 - php driver
sqlncli - Microsoft SQL Server 2008 R2 Native Client Set Up
I installed everything else and I have the following on the php.ini file The code below show where the php drivers are residing:
; On windows:
extension_dir="C:\xampp\php\ext"
The following is under windows extensions
extension=php_pdo_sqlsrv_54_ts.dll
extension=php_sqlsrv_54_ts.dll
When I check the phpinfo file sqlsrv is not listed. I know this may imply that its not installed, but It is installed.
The following is the php info file:
I also restarted apache and the server. Am I missing something ?
I get the following error:
Call to undefined function sqlsrv_connect()
This the code I am using to connect: I am connecting to another server which is hosting SQL Server 2005
/Connection to SQL Server Database
error_reporting(E_ALL);
$serverName = "172.xx.x.xxx";
$connectionInfo = array('Database'=>'Eque', "UID"=>"develop", "PWD"=>"develop");
$conn = sqlsrv_connect($serverName, $connectionInfo);
if($conn) {
echo "Connection established.<br />";
}else {
echo "Connection could not be established.<br />";
die(print_r(sqlsrv_errors(), true));
}