How do I connect to an internal network SQLSRV database securely with PHP?
I have read up on this and it might have to do with the error message I get of Login failed for user 'NT AUTHORITY\IUSR'
fastcgi.impersonate is set to 1
In the SQL database there is no NT AUTHORITY\IUSR setup BUT before I set one up I want to know if its safe or if that allows anyone to connect using it.
If thats not a secure way of connecting how do I connect securely to my database using PHP?
Current PHP with dummy info:
// Server in the this format: <computer>\<instance name> or
// <server>,<port> when using a non default port number
$server='server\login';
$connectinfo=array("Database"=>"mydatabase");
//connect to DB
$db=sqlsrv_connect($server,$connectinfo);
if($db)
{
echo "Connection established.<br/>";
}
else
{
echo "Connection couldn't be established.<br/>";
die(print_r( sqlsrv_errors(), true));
}
Created my own user account in SQL Server 2008 with scope only of the database I am working on.