Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connection problems with PHP to MSSQL2000enterprise

Status
Not open for further replies.

lothadio

Programmer
Apr 5, 2001
27
SI
***********************************************************
I am trying to connect to sql server with PHP, however i recieve this warning

Warning: MS SQL message: Login failed for user 'seidelc'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in header.php on line 6
***********************************************************


***********************************************************
this is my script to connect
<?
$hostname=&quot;nb-life-book-se&quot;;
$username=&quot;jerovsek\seidelc&quot;;
$password=&quot;america&quot;;
$dbname=&quot;pharma&quot;;
mssql_connect(&quot;$hostname&quot;, &quot;$username&quot;, &quot;$password&quot;)
or die(&quot;Connection Refused&quot;);
mssql_select_db(&quot;$dbname&quot;);
?>
***********************************************************


***********************************************************
this is the user information for pharma DB
user_name jerovsek\seidelc
login_name jerovsek\seidelc
permit in database role
public
db_owner
db_accessadmin
db_securityadmin
db_ddladmin
db_backupoperator
db_datareader
db_datawriter
***********************************************************



***********************************************************
what am I missing in configuration to authinicate jerovsek\seidel to connect to pharma?
***********************************************************


thanks
 
You are trying to connect using NT security rather than Standard security. I can't answer for PHP in particular, but in ODBC using a connection string you can add:

[tt]trusted_connection=No[/tt]

and that will force the connection to Standard mode (assuming your SQL Server has been configured to accept Standard mode connections). Robert Bradley
Sr. DBA, some big company
cheap prints and oil paintings:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top