0

please assist.
i can not connect to my sql server (172.16.15.119).
i always get this message"Fatal error: Call to undefined function sqlsrv_connect() in C:\Program Files (x86)\EasyPHP-12.1\www\malunde\connect.php on line 5"

and the code that i used is:

<?php
$serverName = "172.16.15.119"; //serverName\instanceName
$connectionInfo = array( "Database"=>"TPA-CS_UAT", "UID"=>"sa", "PWD"=>"tpa123");
$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));
}

what is wrong with this code?

3
Contributors
3
Replies
17
Views
2 Years
Discussion Span
Last Post by broj1
1

I'll do a bit of guessing here since I do not have experience with MS SQL server. It seems that MS SQL support is not installed in your EasyPHP environment (default is mySql). There is some info on this link on how to do it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.