PHP MSSQL 2005

I have been using PHP and MySQL for a little while now and not had any problems. I am now trying to write some reports for a MSSQL 2005 server but I am having a few problems, maybe you guys could point me in the right direction.

This is the error that gets thrown but im not sure how to solve it.
Call to undefined function sqlsrv_connect() in C:\wamp\www***********.php on line 4

[php]<?php
$server = ‘...:****\SQLEXPRESS’;

$link = sqlsrv_connect($server, 'username, ‘password’);

if (!$link) {
die(‘Something went wrong while connecting to MSSQL’);
}
?>[/php]

Sounds like your server is not configured for SQLSRV. See:

http://www.php.net/manual/en/sqlsrv.installation.php

Ah, I see. Thank you very much. Per that article it also appears that since im running 64bit WAMPP, I will not be able to connect from my localhost. Thank you very much for the quick help.

Sponsor our Newsletter | Privacy Policy | Terms of Service