Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » RADICORE Installation Issues » SQLSRV Driver (How to setup config.inc for multi database option with one of them being 'sqlsrv' )
Re: SQLSRV Driver [message #4733 is a reply to message #4729] Mon, 11 May 2015 16:47 Go to previous message
rafs is currently offline  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));

?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Failed opening required 'include.general.inc'
Next Topic: Error: This application has encountered an unrecoverable error
Goto Forum:
  


Current Time: Thu Nov 28 05:39:33 EST 2024

Total time taken to generate the page: 0.01249 seconds