Error 500 connecting to MSSQL
-
I am having an issue connecting with the External Login plugin. Here is the error in php_errors.log. The database name, host, and port are correct.
[25-May-2022 17:06:24 UTC] EXLOG: [25-May-2022 17:06:24 UTC] array ( 0 => array ( 0 => '08001', 'SQLSTATE' => '08001', 1 => 53, 'code' => 53, 2 => '[Microsoft][ODBC Driver 17 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [53]. ', 'message' => '[Microsoft][ODBC Driver 17 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [53]. ', ), 1 => array ( 0 => 'HYT00', 'SQLSTATE' => 'HYT00', 1 => 0, 'code' => 0, 2 => '[Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired', 'message' => '[Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired', ), 2 => array ( 0 => '08001', 'SQLSTATE' => '08001', 1 => 53, 'code' => 53, 2 => '[Microsoft][ODBC Driver 17 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.', 'message' => '[Microsoft][ODBC Driver 17 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.', ), )
I am able to connect with a test from php using the following (my real values replaced with XXXVALUE):
$serverName = “XXXSERVENAME, XXXPORT”;
$connectionInfo = array( “Database”=>”XXXDATABASE”, “UID”=>”XXXUSERNAME”, “PWD”=>”XXXPASSWORD”);
$conn = sqlsrv_connect( $serverName, $connectionInfo);if( $conn ) {
echo “Connection established.<br />”;
}else{
echo “Connection could not be established.<br />”;
die( print_r( sqlsrv_errors(), true));
}`
`
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Error 500 connecting to MSSQL’ is closed to new replies.