Jump to content

PHP & MSSQL


Deks

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.