| | |
PHP-MSSQL Connectivity
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2008
Posts: 39
Reputation:
Solved Threads: 1
How do you mean in Windows? It will be better understood if you will expantiaite on "activate it in windows or Ubutu". Do you want to connect to your database from your windows operating system such that you will be able to export/import data?
If yes, let the forum know.
Thank you.
If yes, let the forum know.
Thank you.
O God! He that teaches man what he knows not, please grant us the solution.
•
•
Join Date: Jul 2009
Posts: 2
Reputation:
Solved Threads: 0
Have you checked that you have the latest ntwdblib.dll( this has solved my connection problem)? You should paste this dll over your dll's from apache and php(I think it can be found in two places). Restart apache
then use mssql_connect like this:
If it still does not work you should try to connect to the database through MS SQL Management Studio.
If it does not connect talk to the owner of the database
then use mssql_connect like this:
php Syntax (Toggle Plain Text)
$myServer = "xx.xx.xx.xx"; $myUser = "sa"; $myPass = "yyyyyyyyyyyyy"; $myDB = "zzzzzzzzzzz"; //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");
If it still does not work you should try to connect to the database through MS SQL Management Studio.
If it does not connect talk to the owner of the database
Last edited by peter_budo; Jul 24th, 2009 at 3:26 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
![]() |
Similar Threads
- PHP, APACHE and MSSQL (PHP)
- PHP MSSQL APACHE problem in coonecting to database (PHP)
- php mssql connectivity error (PHP)
- PHP 2 MsSQL (PHP)
Other Threads in the PHP Forum
- Previous Thread: marquee not working in ff
- Next Thread: PHP-MYSQL IF/Else statement
| Thread Tools | Search this Thread |
# 5.2.10 alexa apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date directory display dissertation dynamic echo echo$_get[x]changingitintovariable... email encode error fairness file files folder form forms function functions google href htaccess html image images include indentedsubcategory insert ip javascript joomla legislation limit link local login mail memberships menu mlm multiple multipletables mysql mysqlquery newsletters oop open paypal pdf persist php problem provider query radio random recursion remote rss script search server sessions simple sms sockets source space spam sql syntax system table tutorial update upload url validator variable video web youtube





