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) *Also it's on localhost:85
- php_mssql.dll is in ext folder and system32
- I have mssql 2008 express running atm with TCP/IP enabled on port 1433
- Sql Server Browser is on
- 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.