Fred,

If you're using integrated security (e.g., a domain account such as
"domain\bob"), you won't supply a password. However, the "sa" account is
a SQL login (v.s. a domain login). In that case, it would make sense
that you supply a password. See the following page for some code to
connect using integrated security:

http://msdn.microsoft.com/en-us/library/cc296205(SQL.90).aspx

See the following page for some code to connect using a SQL login:

http://msdn.microsoft.com/en-us/library/cc296182(SQL.90).aspx

If you're curious if this is even an authentication/permissions issue,
try to login using a domain login. The login event will be recorded in
the `Event Viewer`. If you're attempt isn't recorded, you've got a
communication problem with the server instance. If it is recorded,
you'll be able to tell what the problem is authenticating.

Good luck, and let us know how it turns out.

A-


-----Original Message-----
From: Fred Silsbee [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 08, 2008 3:30 PM
To: php-db@lists.php.net
Subject: [PHP-DB] Re: MS SQL error...I've come a long way to get this
far

I was just thinking about something I've never understood completely!

mssql_connect($server, 'sa', 'PW'); presumes the server doesn't have all
the permissions in spite of the fact that it has the password.

The password I gave is the XP Prof login PW.

Maybe some other PW. 


--- On Mon, 12/8/08, Fred Silsbee <[EMAIL PROTECTED]> wrote:

> From: Fred Silsbee <[EMAIL PROTECTED]>
> Subject: MS SQL error...I've come a long way to get this far
> To: php-db@lists.php.net
> Date: Monday, December 8, 2008, 7:13 PM
> many changes to php.ini to get this far..whew!
> 
> PHP 5.2.7 just got jerked out from underneathe me (I
> have't replaced it since this is a simple script)
> 
> phpinfo works!
> 
> <?php
> // Server in the this format:
> <computer>\<instance name> or 
> // <server>,<port> when using a non default
> port number
> $server = 'LANDON\SQLEXPRESS';
> 
> $link = mssql_connect($server, 'sa', 'PW');
>   <<<<< line 6
> 
> if(!$link)
> {
>     die('Something went wrong while connecting to
> MSSQL');
> }
> ?>
> 
> 
> Warning: mssql_connect() [function.mssql-connect]: Unable
> to connect to server: LANDON\SQLEXPRESS in
> C:\Inetpub\wwwroot\trymssql.php on line 6
> Something went wrong while connecting to MSSQL


      


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to