1

I am trying to install Mantis 2.5.1 with PHP 7.0.15 and MS SQL Server 2012. The database is already created and user has db owner permission. Pre-installation check has no errors, but when I try to install database, I get an error as:

SQLState: 08001 Error Code: 67 Message: [Microsoft][ODBC Driver 11 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [67]. ....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. ...

I have checked the following already:

  • Named pipes is already enabled on sql server.
  • I have copied php_sqlsrv_7_nts_x64.dll and php_pdo_sqlsrv_7_nts_x64.dll to php extension directory, and enabled them as extensions in PHP manager in IIS 7.
  • Connection to sql server is possible with same credentials (tested using conn.udl)

Settings in config_defaults_inc.php

$g_hostname = 'Driver={SQLServer};SERVER=server;DATABASE=dbname;UID=username;PWD=password;';

$g_db_username = 'username';

$g_db_password = 'password';

$g_db_type = 'odbc_mssql';

What could I be missing? Pls help.

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
sprisoner
  • 11
  • 1

1 Answers1

0

ensure that your instance is configured for SQL Server authentication.

enter image description here

If you change the auth mode, you need to restart the instance, which can be done in SSMS by right click to the instance name --> restart.

Joe Platano
  • 586
  • 1
  • 14
  • 27
  • Both modes are already enabled. As I mentioned, I can connect to sql server with same credentials when I try using conn.udl. I even tried the following php code in the same directory, and it shows connection established. $connectionInfo = array("Database"=>$myDB, "UID" => $myUser, "PWD" => $myPass); $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn ) { echo "Connection established.
    "; }else{ echo "Connection could not be established.
    "; die( print_r( sqlsrv_errors(), true)); }
    – sprisoner Jul 05 '17 at 13:34
  • sorry i overlooked that by mistake – Joe Platano Jul 05 '17 at 15:23