Jump to content

Recommended Posts

Hello,

 

am having problem with connection to mssql server and database. Am using Xampp and i think there is some problem about his configuration.

All the time am getting error : missing driver php_mssql.dll in xampp/php/ext/  ....and file php_mssql.dll is there (same problem with php_pdo_mssql.dll).

Also am getting this error: "Fatal error: Call to undefined function mssql_connect() "

I tried everything i could find on forums, blogs, and php documentation...but always same.

 

btw... i removed ";"  in php.ini from necessary lines and i copy ntwdblib.dll in necessary folders.

This is my connection code:

   $dbHost = 'Workstation:<port>';
   $dbUser = 'user';
   $dbPass = 'pass';
   $dbName = 'database';
$con = mssql_connect ($dbHost, $dbUser, $dbPass) or die ('MsSQL connect failed. ' . mssql_error());
mssql_select_db($dbName) or die('Cannot select database. ' . mssql_error());

 

I also tried with:

$connection = odbc_connect("Driver={SQL Server Native Client 10.0};Server=$server;Database=$database;", $user, $password);

but always same....

 

 

Can anybody please provide me some working solution ?

 

 

Thanks.

 

 

Link to comment
https://forums.phpfreaks.com/topic/247890-php-mssql/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.