Skip to Content.
Sympa Menu

freetds - [freetds] How can I connect to MS SQL Server without store user & password in php file?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: <mario.freire AT caixa.gov.br>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] How can I connect to MS SQL Server without store user & password in php file?
  • Date: Wed, 25 Jan 2006 17:34:57 -0200

Hi, everybody!

I have a server running Suse Linux and Apache http server with Freetds 0.60
(TDS v. 8.0). I want to connect to a MS SQL Server 2000 database from a php
code inserted in a html page. I need to use Windows Integrated Security Mode
(Trusted Connection) or something similar as, for security reasons, I can't
store user and password in the php file. Freetds user guide says that it is
possible, but I have no idea how can I do it... I use this function to
connect to the database: mssql_connect ( [string nomedoservidor [, string
username [, string password]]] ).
My questions are:
1) When I ommit username and password in mssql_connect, which user (and
password) will be used to connect to the database?
2) Is there another function to use?

Thank you a lot in advance!

Best Regards,
Mário Freire.




Archive powered by MHonArc 2.6.24.

Top of Page