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

  • SEARCH
  • Home
  • 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 7611939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:47:23+00:00 2026-05-31T01:47:23+00:00

I installed sql server 2008 on my pc and try to connect to it

  • 0

I installed sql server 2008 on my pc and try to connect to it from php code.

$server = "127.0.0.1:1433\MSSQLSERVER";
mssql_connect($server, 'sa', '123456');

and faced with this error.

Unable to connect to server: 127.0.0.1:1433\MSSQLSERVER

please help me.

  • 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-31T01:47:24+00:00Added an answer on May 31, 2026 at 1:47 am

    Are you using an named instance MSSQLSERVER? SQLExpress uses the named instance MSSQLSERVER by default. SQL Server does not do this, it’s default is to not use named instances.

    The default database in SQL will operate on port 1433 unless you specify otherwise when you set it up. By default most applications will assume this is the port if you don’t specify and attempt to connect to it. The purpose of named instances is that each DB instance actually operates on it’s own port and so if you specify an instance, the default instance running on 1433 will respond with a “no dude the DB you want is running on this port.”

    Have you tried just 127.0.0.1:1433?

    [UPDATE]

    Last time I played with PHP and SQL Server I used odbc_connect and not mssql_connect and I setup a DSN entry with connection parameters. This was the code I used.

    $dsn="MyDatabase";
    $username="phpUser";
    $password="whatever";
    
    $sqlconnect=odbc_connect($dsn, $username, $password);
    
    $sqlquery="SELECT * FROM Sample;";
    
    $results= odbc_exec($sqlconnect,$sqlquery);
    

    [UPDATE2]

    Microsoft released Microsoft Drivers for PHP for SQL Server and there’s a new way to connect to MSSQL.

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

Sidebar

Related Questions

I've just installed SQL Server 2008 Developer edition and I'm trying to connect using
I have Installed SQL server 2008 I want to connect to it using c#
For some reason, when I try to install SQL Server 2008 Express , I
When I try to install a new instance of SQL Server 2008 Express on
I installed SQL Server 2008 (SQL Server 2005 was already installed) on my XP
I just installed SQL Server 2008 Express on my Vista SP1 machine. I previously
i just installed sql server 2008 express in order to learn microsoft sql. why
I have just installed SQL Server 2008 including Reporting Services on Windows Server 2003.
I have a server where I installed SQL Server 2008 and after I applied
I have two servers where I installed SQL Server 2008 Production: RAID 1 on

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.