MSSQL Server

MSSQL Server

am 21.12.2006 19:52:40 von Dan Shirah

------=_Part_44235_29797453.1166727160747
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I cannot connect to my MSSQL server.

I use the following connection string:

php:
------------------------------
$connection = mssql_connect ('server','user',
'password') or die ('server connection failed');

$database = mssql_select_db ("database_name"
, $connection) or die ('DB selection failed');
?>
------------------------------



The MSSQL server is setup to use Windows and Server Authentication. I have a
*local* dummy account setup for testing and when using this account I can
connect with no problems, but when I try and use my domain/network account I
cannot connect at all. (my network account has full access to the server,
database and tables) I can even login to the SQL Management Studio using
Windows Authentication and my network account, but still cannot connect
using PHP.

Any ideas?

------=_Part_44235_29797453.1166727160747--

Re: MSSQL Server

am 21.12.2006 20:20:34 von Trevor Gryffyn

I had some issues a couple years ago connecting to the MS SQL Server where I was employed at the time.

I was probably just doing something wrong, but what I ended up using that worked for me was using the ADODB database abstraction layer. Helped me connect to MS SQL , Oracle and some other random data sources I had to from time to time.

http://adodb.sourceforge.net/

Sorry I don't have time to look for good examples, but maybe the documentation will help out some and get you on the right path.

-TG

= = = Original message = = =

I cannot connect to my MSSQL server.

I use the following connection string:

php:
------------------------------
$connection = mssql_connect ('server','user',
'password') or die ('server connection failed');

$database = mssql_select_db ("database_name"
, $connection) or die ('DB selection failed');
?>
------------------------------



The MSSQL server is setup to use Windows and Server Authentication. I have a
*local* dummy account setup for testing and when using this account I can
connect with no problems, but when I try and use my domain/network account I
cannot connect at all. (my network account has full access to the server,
database and tables) I can even login to the SQL Management Studio using
Windows Authentication and my network account, but still cannot connect
using PHP.

Any ideas?


___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

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

Re: MSSQL Server

am 21.02.2007 08:43:18 von Haydar TUNA

Hello,
If you can change the SQL Server Authentication to the Mixed Mode
(Windows and Remote User), your problem will be fixed. If you use the Unix
like Operating System, you can install FreeTDS package to connect MSSQL
Server.:)



--
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net

""Dan Shirah"" wrote in message
news:a16da1ff0612211052o69fe337bx454b56789a348739@mail.gmail .com...
>I cannot connect to my MSSQL server.
>
> I use the following connection string:
>
> php:
> ------------------------------
> $connection = mssql_connect
> ('server','user',
> 'password') or die ('server connection failed');
>
> $database = mssql_select_db
> ("database_name"
> , $connection) or die ('DB selection failed');
> ?>
> ------------------------------
>
>
>
> The MSSQL server is setup to use Windows and Server Authentication. I have
> a
> *local* dummy account setup for testing and when using this account I can
> connect with no problems, but when I try and use my domain/network account
> I
> cannot connect at all. (my network account has full access to the server,
> database and tables) I can even login to the SQL Management Studio using
> Windows Authentication and my network account, but still cannot connect
> using PHP.
>
> Any ideas?
>

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

Re: Re: MSSQL Server

am 21.02.2007 18:07:20 von frank

Or use the mssql.secure_connection = On in php.ini to allow the system to
use the current user account for authentication.

- Frank

> Hello,
> If you can change the SQL Server Authentication to the Mixed Mode

> (Windows and Remote User), your problem will be fixed. If you use the
Unix
> like Operating System, you can install FreeTDS package to connect MSSQL

> Server.:)
>
>
>
> --
> Haydar TUNA
> Republic Of Turkey - Ministry of National Education
> Education Technology Department Ankara / TURKEY
> Web: http://www.haydartuna.net
>
> ""Dan Shirah"" wrote in message
> news:a16da1ff0612211052o69fe337bx454b56789a348739@mail.gmail .com...
> >I cannot connect to my MSSQL server.
> >
> > I use the following connection string:
> >
> > php:
> > ------------------------------
> > $connection = mssql_connect
> > ('server','user',
> > 'password') or die ('server connection failed');
> >
> > $database = mssql_select_db
> > ("database_name"
> > , $connection) or die ('DB selection failed');
> > ?>
> > ------------------------------
> >
> >
> >
> > The MSSQL server is setup to use Windows and Server Authentication. I
have
> > a
> > *local* dummy account setup for testing and when using this account I
can
> > connect with no problems, but when I try and use my domain/network
account
> > I
> > cannot connect at all. (my network account has full access to the
server,
> > database and tables) I can even login to the SQL Management Studio
using
> > Windows Authentication and my network account, but still cannot
connect
> > using PHP.
> >
> > Any ideas?
> >
>
> --
> 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