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 3238318
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:50:24+00:00 2026-05-17T17:50:24+00:00

I am trying to connect to sql server using php using following code: $myServer

  • 0

I am trying to connect to sql server using php using following code:

$myServer = "server";
$myUser = "username";
$myPass = "password";
$myDB = "test";

//connection to the database
$dbhandle = mssql_connect($myServer, $myUser, $myPass)
  or die("Couldn't connect to SQL Server on $myServer");

Getting following error:

Fatal error: Call to undefined
function mssql_connect() in
/var/www/echdp/mssql_connection.php on
line 26

Using php version

PHP Version 5.3.2-1ubuntu4.2

I have googled it many time and also try to search php_mssql extension but not found. Also search to install mssql extension but not find a useful link/tutorial .

  • 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-17T17:50:24+00:00Added an answer on May 17, 2026 at 5:50 pm

    If mssql_connect() is not available then it sounds like the MSSQL module isn’t installed. You can check this with the phpinfo() function which will list all your compiled modules.

    On Ubuntu you should be able to install the module from a package:-

    apt-get install php5-sybase

    (this is the Sybase/MSSQL Server module for php5)

    …or as the previous answers states, compile from source with MSSQL flag

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

Sidebar

Related Questions

I'm using the SQL Server Driver for PHP to connect to an SQL Server
Trying to connect to a SQL Server 2005 instance remotely but getting the following
I'm trying to connect using several different clients to SQL Server 2005 standard, which
I am trying to connect to a Microsoft SQL 2005 server which is not
I'm trying to connect to an access database from a php script using ODBC.
I get this error when trying to connect to SQL Server. Error is: Login
I'm trying to connect to a sql server 2005 database via JDBC. I get
I'm trying to connect Rails to SQL Server. I installed the activerecord-sqlserver-adapter and ruby-odbc
I am getting a very non specific error when trying to connect to SQL
I'm trying to connect to an oracle database with SQL Developer. I've installed the

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.