modified sqlsrv test
This commit is contained in:
parent
9e8cb88ca7
commit
75ee4f90ad
|
@ -1217,7 +1217,7 @@ int get_conn_option_key( sqlsrv_context& ctx, zend_string* key, size_t key_len,
|
||||||
}
|
}
|
||||||
|
|
||||||
bool valid = true;
|
bool valid = true;
|
||||||
if( stricmp( SS_CONN_OPTS[i].sqlsrv_name, ODBCConnOptions::Authentication ) == 0 ) {
|
if( stricmp( SS_CONN_OPTS[i].sqlsrv_name, SSConnOptionNames::Authentication ) == 0 ) {
|
||||||
valid = core_is_authentication_option_valid( value, value_len );
|
valid = core_is_authentication_option_valid( value, value_len );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,19 @@ Test the Authentication keyword and its accepted values: SqlPassword and ActiveD
|
||||||
<?php
|
<?php
|
||||||
require_once("autonomous_setup.php");
|
require_once("autonomous_setup.php");
|
||||||
|
|
||||||
|
$connectionInfo = array( "UID"=>$username, "PWD"=>$password );
|
||||||
|
$conn = sqlsrv_connect( $serverName, $connectionInfo );
|
||||||
|
if( $conn === false )
|
||||||
|
{
|
||||||
|
echo "Failed to connect!\n";
|
||||||
|
print_r( sqlsrv_errors() );
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////
|
||||||
|
|
||||||
$connectionInfo = array( "UID"=>$username, "PWD"=>$password,
|
$connectionInfo = array( "UID"=>$username, "PWD"=>$password,
|
||||||
"Authentication"=>'SqlPassword', "TrustServerCertificate"=>true );
|
"Authentication"=>"SqlPassword", "TrustServerCertificate"=>true );
|
||||||
|
|
||||||
$conn = sqlsrv_connect( $serverName, $connectionInfo );
|
$conn = sqlsrv_connect( $serverName, $connectionInfo );
|
||||||
if( $conn === false )
|
if( $conn === false )
|
||||||
|
@ -31,11 +42,12 @@ else
|
||||||
var_dump( $first_db );
|
var_dump( $first_db );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sqlsrv_free_stmt( $stmt );
|
||||||
sqlsrv_close( $conn );
|
sqlsrv_close( $conn );
|
||||||
|
|
||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
|
|
||||||
$connectionInfo = array( "Authentication"=>'ActiveDirectoryIntegrated', "TrustServerCertificate"=>true );
|
$connectionInfo = array( "Authentication"=>"ActiveDirectoryIntegrated", "TrustServerCertificate"=>true );
|
||||||
|
|
||||||
$conn = sqlsrv_connect( $serverName, $connectionInfo );
|
$conn = sqlsrv_connect( $serverName, $connectionInfo );
|
||||||
if( $conn === false )
|
if( $conn === false )
|
||||||
|
|
Loading…
Reference in a new issue