Hi!
I have an issue regarding making a connection to mssql via php.
I use PHP 5.3.14 (TS), SQL driver for php v 5.3 (TS).
The problem is that when i try to serve php file, for example config.php, which contains script like:
<?php
$serverName = "SERVER";
$connectionInfo = array( "Database"=>"TestToken");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn )
{
echo "Connection established.\n";
}
else
{
echo "Connection could not be established.\n";
die( print_r( sqlsrv_errors(), true));
}
?>
Engine says "Connection could not be established." and no any other sql errors....
But when I am sending this file directly to php-cgi.exe -f somepath/config.php I get message "Connection established."
What am I doing wrong or maybe I just don't understand something? If anyone had experienced this problem before, please provide a hint. Any help will be greatly appreciated.