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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:27:12+00:00 2026-05-18T07:27:12+00:00

Hi I have the following script which works fine running on IIS but when

  • 0

Hi I have the following script which works fine running on IIS but when I put the same script on a Linux box it fails with the following error. Should this not just work?

Fatal error: Call to undefined function mssql_connect() in /home/thePathToTheScript/services/dhTest.php on line 10

Line 10 = $dbhandle = mssql_connect($myServer, $myUser, $myPass)

//start
$myServer = "SQLB15.sqlDBCenter.com";
$myUser = "unc_user";
$myPass = "unc1234";
$myDB = "db_Stuff"; 

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

//select a database to work with
$selected = mssql_select_db($myDB, $dbhandle)
  or die("Couldn't open database $myDB"); 

//declare the SQL statement that will query the database
$query = "SELECT DISTINCT Name As theName";
$query .= "FROM tb_Names ";
$query .= "ORDER BY Name";

//execute the SQL query and return records
$result = mssql_query($query);
//---------------------------------------------------------------- 

Any pointers much appreciated

Added – this is the mssql section of the php.ini
[MSSQL]
; Allow or prevent persistent links.
mssql.allow_persistent = On

; Maximum number of persistent links. -1 means no limit.
mssql.max_persistent = -1

; Maximum number of links (persistent+non persistent). -1 means no limit.
mssql.max_links = -1

; Minimum error severity to display.
mssql.min_error_severity = 10

; Minimum message severity to display.
mssql.min_message_severity = 10

; Compatability mode with old versions of PHP 3.0.
mssql.compatability_mode = Off

; Connect timeout
;mssql.connect_timeout = 5

; Query timeout
;mssql.timeout = 60

; Valid range 0 – 2147483647. Default = 4096.
;mssql.textlimit = 4096

; Valid range 0 – 2147483647. Default = 4096.
;mssql.textsize = 4096

; Limits the number of records in each batch. 0 = all records in one batch.
;mssql.batchsize = 0

; Specify how datetime and datetim4 columns are returned
; On => Returns data converted to SQL server settings
; Off => Returns values as YYYY-MM-DD hh:mm:ss
;mssql.datetimeconvert = On

; Use NT authentication when connecting to the server
mssql.secure_connection = Off

; Specify max number of processes. Default = 25
;mssql.max_procs = 25

  • 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-18T07:27:13+00:00Added an answer on May 18, 2026 at 7:27 am

    You are trying to use the mssql extension, which is probably not loaded. You need to check your php.ini and look for “extension=mssql.so”, then uncomment it and restart Apache.

    If this extension it is not there, or if it does not work (errors when restarting apache or when running the script), then you will need to check with your Linux distribution what additional packages do you need and how to make it work.

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

Sidebar

Related Questions

I have the following script: http://jsfiddle.net/oshirowanen/8mQ7x/1/ Which works fine, but as soon as I
I have the following script, which works fine in Chrome but not in IE8:
I'm running a script fine from the command line, but it fails when put
I have the following script which works fine: $.ajax({ url: 'serverside_script', type: 'GET', dataType:
I have the following lua script : module(modoo,package.seeall) foo=1 bar={12,34} Which works fine using
I have the following script which works fine locally: <?php //Report all errors error_reporting(E_ALL);
I have an existing image upload script (below) which works fine but I would
Hi all i have the following merge sql script which works fine for a
I currently have the following script: http://jsfiddle.net/oshirowanen/mnXdv/ Which works fine, i.e. if a click
I have the following script which works fine: $(.txtDate).datepicker( { changeMonth: true, changeYear: true,

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.