Page 1 of 1

A noob who can't even connect to mssql~ plz help

Posted: Sat Aug 08, 2009 6:19 am
by night5life
Hello everyone,

First off let me say I just recently (like a day ago) got into php and mssql 2005/2008.

Okay so these are the things i have setup:

- Apache with Xampp (on php.ini, there is no semicolon on both php_mysql.dll and php_mssql.dll)
- php_mssql.dll is in ext folder and system32
- I have mssql 2008 express running atm with TCP/IP enabled on port 1433
- I have a database on mssql 2008 that i customized (the one i would like to access)

SO, basically... i can't even connect to the dang mssql... lol
I used this:

<?php
$server = 'ADMIN-PC\SQLEXPRESS'; <-- I also tried 'localhost, 1433'
$link = mssql_connect($server, 'sa', '');
if(!$link)
{
die('Something went wrong while connecting to MSSQL');
}
?>

BUT no luck.... i get the error saying could not connect to 'ADMIN-PC\SQLEXPRESS'

BUT i successfully got into the server using ODBC:
(yes i have odbc setup)
<?php
$dsn="sqlserver";
$username="sa";
$password="";
odbc_connect($dsn,$username,$password);
?>

So i have no idea what to do here and asking this awesome community for help!
Thank you all in advance.

Re: A noob who can't even connect to mssql~ plz help

Posted: Sat Aug 08, 2009 2:17 pm
by SidewinderX
Is there any reason in particular you are using mssql as opposed to mysql?

Re: A noob who can't even connect to mssql~ plz help

Posted: Sat Aug 08, 2009 5:06 pm
by night5life
yes, the database i'm using has procedures that mysql cannot support (it's a database of a game: knight online).

Re: A noob who can't even connect to mssql~ plz help

Posted: Sat Aug 08, 2009 5:15 pm
by Eran
MySQL has had procedures for several years now (since 5.0)