Problems Connecting to MSSQL 2012

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Problems Connecting to MSSQL 2012

Postby onyxtacular » 11. December 2015 14:45

Hi Everyone,
I'm very excited about this joining this group.

I've been tasked to create a webpage to connect to our company database. I have a working knowledge of PHP and have connected to mySQL in the past. This is what I've done thus far:

~successfully install Xampp v 3.2.2.2 control panel and have Apache, MySQL, FileZilla and Mecury running on a Widows 8 computer.

~downloaded and installed php_pdo_sqlsrv_56_ts.dll php_sqlsrv_56_ts.dll from the Microsoft website into the C:\xampp\php\ext

~Added extension=php_pdo_sqlsrv_56_ts.dll and extension=php_sqlsrv_56_ts.dll to the PHP.ini file

I created a PHP file with this code:
Code: Select all
<?php
$serverName = "ONYX5";
$connectionInfo = array( "Database"=>"ONYXMAX5");
$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));
    
 }
?>



and this code:

Code: Select all
<?php
$serverName = "ONYX"; //serverName\instanceName
$connectionInfo = array( "Database"=>"ONYXMAX5", "UID"=>"test", "PWD"=>"test");
$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));
}
?>


and both returned:
Connection could not be established.
Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -49 [code] => -49 [2] => This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 [message] => This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 ) [1] => Array ( [0] => IM002 [SQLSTATE] => IM002 [1] => 0 [code] => 0 [2] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified [message] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ) )



I checked the ODBC Data Source Administrator (64-bit) and under the Drivers Tab there is an entry Name: SQL Server Version 6.03.9600317415 Company: Microsoft Corporation File: SQLSRV32.DLL Date: 11/21/2014

Any advice is appreciated.

Thanks,
onyxtacular
 
Posts: 4
Joined: 11. December 2015 14:17
Operating System: Windows 8

Re: Problems Connecting to MSSQL 2012

Postby Nobbie » 11. December 2015 15:48

Sorry, but this forum does not provide professional support for companys. It is designed for private users and their technical issues about Xampp. We cannot give free support to commercial users.
Nobbie
 
Posts: 8770
Joined: 09. March 2008 13:04

Re: Problems Connecting to MSSQL 2012

Postby onyxtacular » 12. December 2015 01:08

I'm not making any money on it I'm just trying to get a project completed. Why would you care if it is for a company or not? What happened to sharing knowledge just for the sake of sharing knowledge?
onyxtacular
 
Posts: 4
Joined: 11. December 2015 14:17
Operating System: Windows 8

Re: Problems Connecting to MSSQL 2012

Postby Nobbie » 12. December 2015 11:26

onyxtacular wrote:Why would you care if it is for a company or not?


Because company usually do not give away their products for free - why should i help them to earn money? Are you working for free in your company? I am working for free here. Finally, you get paid for my knowledge, isnt it so? I prefer to help those, who are not paid and do not have suffient money, to pay professional support. Anyway, i cannot help everybody, so i decided to help the private people.
Nobbie
 
Posts: 8770
Joined: 09. March 2008 13:04

Re: Problems Connecting to MSSQL 2012

Postby Altrea » 12. December 2015 13:52

onyxtacular wrote:Why would you care if it is for a company or not?


=> [INFO] How to not fail getting help here (section: scope of support)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8291
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Problems Connecting to MSSQL 2012

Postby onyxtacular » 12. December 2015 17:08

Whatever, I'll find it some other way. You probably don't know the answer anyway just huffing and puffing to look big. People that have knowledge share it. I like sharing my knowledge. It doesn't cost me anything and it helps others. Who cares if someone makes a buck or too off of it? You're a small man to let's someone else's gain affect doing good for goodness sake.

When I do find the answer I'll come back and post it here. Then you can learn how it is down.
onyxtacular
 
Posts: 4
Joined: 11. December 2015 14:17
Operating System: Windows 8

Re: Problems Connecting to MSSQL 2012

Postby Nobbie » 12. December 2015 18:47

onyxtacular wrote:You probably don't know the answer


Exactly. I dont do "huffing and puffing" (what for??), i simply dont know the answer (as in many cases), but i dont want to spend my time on it. Of course i would write it down, if i knew it (this is the part, you obviously got totally wrong). But i dont know it, i have to spend time on it and thats exactly what i dont like to do for companys. I do it for private people, that cannot pay for professional support.
Nobbie
 
Posts: 8770
Joined: 09. March 2008 13:04

Re: Problems Connecting to MSSQL 2012

Postby onyxtacular » 12. December 2015 19:01

Found it:

https://www.microsoft.com/en-us/download/details.aspx?id=36434

install this on your webserver (choose the server module)

bam.


Done,
You're welcome.
onyxtacular
 
Posts: 4
Joined: 11. December 2015 14:17
Operating System: Windows 8

Re: Problems Connecting to MSSQL 2012

Postby Altrea » 12. December 2015 19:19

Wow, now you are looking so much bigger...

I am serious, you don't know me and I don't know you. But you are the one thinking you can judge about somebodys attitude. It is my freetime I spent here for years now helping others. So I am fine if one single person like you think I am looking small just because I don't provide commercial orientated help :D
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8291
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Problems Connecting to MSSQL 2012

Postby Nobbie » 12. December 2015 19:36

onyxtacular wrote:Found it:


So why did you ask? Thats what is written in the error message:

This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 ) [1]
Nobbie
 
Posts: 8770
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: Bonniem and 66 guests