I am simply trying to connect my php to an microsoft sql server 2005. However, I'm getting this error: Fatal error: Call to undefined function sqlsrv_connect() in C:\wamp\www\last\connect.php
My code is simply:
<?php
$serverName = "OurIPAddress"; //serverName\instanceName, portNumber (default is 1433)
$connectionInfo = array( "Database"=>"Thenameofourdatabase", "UID"=>"OurID", "PWD"=>"Ourpassword");
$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));
}
?>
I installed microsoft driver 3.0 from this link Microsoft driver 3.0
and edited the php.ini file from the apache server with extension=c:/wamp/bin/php/php5.5.12/ext/php_sqlsrv_53_ts.dll.
Following the instructions carefully the sqlsrverconnectdriver doesn't show on php_info()
P.S I followed this links: Question 1 Question 2 Question 3