Re: SQLSRV Driver [message #4733 is a reply to message #4729] |
Mon, 11 May 2015 16:47 |
rafs
Messages: 69 Registered: May 2015
|
Member |
|
|
Probably obvious of a more experienced troubleshooter, but for the benefit of others, here is the test.php file that I used to check my connection issue:
<?php
// server 1
$servers[1]['dbhost'] = 'my.fqdn.com';
$servers[1]['dbengine'] = 'sqlsrv';
$servers[1]['dbusername'] = 'myusername';
$servers[1]['dbuserpass'] = 'mypassword';
$servers[1]['dbport'] = '';
$servers[1]['dbsocket'] = '';
$servers[1]['dbprefix'] = '';
$servers[1]['dbnames'] = 'MYDBNAME,*';
$servers[1]['serverName'] = 'my.fqdn.com';
$servers[1]['SQLSRV_schema'] = 'dbo';
$servers[1]['connectionInfo'] = array(
'Database' => 'MYDBNAME',
'UID' => 'myusername',
'PWD' => 'mypassword',
'CharacterSet' => 'UTF-8',
'ReturnDatesAsStrings' => true);
$dbconn = sqlsrv_connect($servers[1]['serverName'], $servers[1]['connectionInfo']) or
die( print_r( sqlsrv_errors(), true));
?
|
|
|