try simpler connection tests

This commit is contained in:
yitam 2017-05-08 12:45:06 -07:00
parent 04fde120f4
commit 645ff1e265
2 changed files with 40 additions and 19 deletions

View file

@ -18,25 +18,6 @@ environment:
PHP_DEPSVER: 7.0
PHP_SDK: c:\projects\php
matrix:
- BUILD_PLATFORM: x86
TEST_PHP_SQL_SERVER: (local)\SQL2014
SQL_INSTANCE: SQL2014
PHP_VC: 14
PHP_MAJOR_VER: 7.0
PHP_MINOR_VER: latest
PHP_SDK_DIR: c:\projects\php\x86
PHP_INSTALL_DIR: c:\projects\php\x86\bin
platform: x86
- BUILD_PLATFORM: x64
TEST_PHP_SQL_SERVER: (local)\SQL2012SP1
SQL_INSTANCE: SQL2012SP1
PHP_VC: 14
PHP_MAJOR_VER: 7.0
PHP_MINOR_VER: latest
PHP_SDK_DIR: c:\projects\php\x64
PHP_INSTALL_DIR: c:\projects\php\x64\bin
PHP_ZTS: --disable-zts
platform: x64
- BUILD_PLATFORM: x64
TEST_PHP_SQL_SERVER: (local)\SQL2016
SQL_INSTANCE: SQL2016
@ -56,6 +37,25 @@ environment:
PHP_INSTALL_DIR: c:\projects\php\x86\bin
PHP_ZTS: --disable-zts
platform: x86
- BUILD_PLATFORM: x64
TEST_PHP_SQL_SERVER: (local)\SQL2012SP1
SQL_INSTANCE: SQL2012SP1
PHP_VC: 14
PHP_MAJOR_VER: 7.0
PHP_MINOR_VER: latest
PHP_SDK_DIR: c:\projects\php\x64
PHP_INSTALL_DIR: c:\projects\php\x64\bin
PHP_ZTS: --disable-zts
platform: x64
- BUILD_PLATFORM: x86
TEST_PHP_SQL_SERVER: (local)\SQL2014
SQL_INSTANCE: SQL2014
PHP_VC: 14
PHP_MAJOR_VER: 7.0
PHP_MINOR_VER: latest
PHP_SDK_DIR: c:\projects\php\x86
PHP_INSTALL_DIR: c:\projects\php\x86\bin
platform: x86
# PHP_MAJOR_VER is PHP major version to build (7.0, 7.1)

View file

@ -6,6 +6,27 @@ Test the Authentication keyword with options SqlPassword and ActiveDirectoryInte
<?php
require_once("autonomous_setup.php");
$connectionInfo = array( "UID"=>$username, "PWD"=>$password );
$conn = sqlsrv_connect( $serverName, $connectionInfo );
if( $conn === false )
{
echo "Could not connect.\n";
print_r( sqlsrv_errors() );
}
$connectionInfo = array( "UID"=>$username, "PWD"=>$password,
"TrustServerCertificate"=>true );
$conn = sqlsrv_connect( $serverName, $connectionInfo );
if( $conn === false )
{
echo "Could not connect with TrustServerCertificate.\n";
print_r( sqlsrv_errors() );
}
//if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN')
{
$connectionInfo = array( "UID"=>$username, "PWD"=>$password,