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.
A noob who can't even connect to mssql~ plz help
Moderator: General Moderators
-
night5life
- Forum Newbie
- Posts: 2
- Joined: Sat Aug 08, 2009 6:09 am
-
SidewinderX
- Forum Contributor
- Posts: 407
- Joined: Fri Jul 16, 2004 9:04 pm
- Location: NY
Re: A noob who can't even connect to mssql~ plz help
Is there any reason in particular you are using mssql as opposed to mysql?
-
night5life
- Forum Newbie
- Posts: 2
- Joined: Sat Aug 08, 2009 6:09 am
Re: A noob who can't even connect to mssql~ plz help
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
MySQL has had procedures for several years now (since 5.0)