Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7022889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:38:26+00:00 2026-05-27T23:38:26+00:00

I have computer, A, with a PHP program that connects and manipulates DB in

  • 0

I have computer, A, with a PHP program that connects and manipulates DB in computer B1. For the connection to the MS SQL server, I use the following script, which works well. There is only one account on this SQL server, and it is “sa”.

$server = 'WAREHOUSE1\MYDB';

$connectionInfo = array("UID" => "sa", "PWD" => "something", "Database"=>"MYDB");

$dbcMssql = sqlsrv_connect($server, $connectionInfo);

We got a new computer, B2, to replace this computer because it was old and slow. I set up the new DB and restored it from B1’s, set up firewall settings just like in B1, checked “allow remote connection” and selected “SQL Swrver and Windows Auth. mode” in MS SQL Server Management Studio, etc.. I am able to connect on the DB’s on computers B1 and B2 from computer A using MS SQL Server Management Studio. I’ve even linked the tables to MS Access (OBDC database) using the same user id (“sa”) and password.

The problem is that on the new computer, B2, my PHP script doesn’t work anymore, even though I can connect to it using the MS SQL program. I don’t recall setting up anything other than what I’ve already done when I was setting up B1. The error is as follow from sqlsrv_errors().

[SQLSTATE] => 28000

[code] => 18456

[message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'sa'.

The error is not logged for some reason in the errorlog file on the server folder for some reason, so I don’t know what the state of the error is.. What could be the problem? I have read several articles this entire afternoon, but I’m unable to make this work! Again, connection to B1 from A is fine, which leads me to believe that I didn’t set something on B2. B1 and B2 have same version SQL servers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:38:26+00:00Added an answer on May 27, 2026 at 11:38 pm

    IRC the TCP/IP protocol is disabled by then default installation. You need to go to SQL Server Config and enable it from there.

    Edit: Ok, just read it again, and if you are able to connect remotelly via TCP/IP then it should work from your PHP script aswell. Are you sure the connection string ends up pointing at the right (B2? )server ? Can it be a name resolution issue?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an issue with php where code works on on computer but wont
Currently I have a website on my local computer that uses PHP to make
I have a php script that is rather hairy and I'm trying to troubleshoot
I have an Apache server running on a client's computer, with PHP installed. I
I have HTML tidy extension on my home computer using PHP 5.2.11 (Windows -
I noticed that every time that I restart my computer I have to do
NOTE: program in java, server uses php, and mysql...file is .log or .txt file
i have installed on my computer WAMP with PHP 5.2.9-2 . I want to
I have one problem. I have EasyPHP server on my local computer. I am
(I Use Ubuntu) I'm looking for some pointers for writing a firewall program which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.