Deks Posted September 26, 2011 Share Posted September 26, 2011 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 More sharing options...
Adam Posted September 26, 2011 Share Posted September 26, 2011 Did you restart Apache after you removed the semi-colon? Link to comment https://forums.phpfreaks.com/topic/247890-php-mssql/#findComment-1272891 Share on other sites More sharing options...
criostage Posted September 26, 2011 Share Posted September 26, 2011 Every single configuration you do to apache (even if you add or remove a dot) in the config you MUST restart the apache service on your computer otherwise your apache server wont assume the new settings. Link to comment https://forums.phpfreaks.com/topic/247890-php-mssql/#findComment-1272915 Share on other sites More sharing options...
Deks Posted September 26, 2011 Author Share Posted September 26, 2011 ofc i did restart, not just apache..i restarted pc also. Like i told i did everything in my knowledge i collected from forums, blogs, and php documentation. Link to comment https://forums.phpfreaks.com/topic/247890-php-mssql/#findComment-1272920 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.