Quantcast
Channel: Microsoft Drivers for PHP for SQL Server forum
Viewing all articles
Browse latest Browse all 391

atal error: Call to undefined function sqlsrv_connect()

$
0
0
I have MSSQL Server 2008, MS WINDOWS SERVER 2008 RC2 AND PHP 5.4.9

php.info have rows

    [PHP_PDO_SQLSRV_54_NTS]
    extension=php_pdo_sqlsrv_54_nts.dll
    [PHP_PDO_ODBC]
    extension=php_pdo_odbc.dll
    [PHP_SYBASE_CT]
    extension=php_sybase_ct.dll
    [PHP_SQLSRV_54_NTS]
    extension=php_sqlsrv_54_nts.dll

Php info found here `http://89.111.180.28/index.php`

**i see lines with Extensions php.ini but i dont see lines with extensions SQLSRV in php.info...**

for connect to MSSQL SERVER i use script 

    $conn_array = array (
    "UID" => "user", 
    "PWD" => "passw", 
    "Database" => "database",
    "Encrypt" => 1,
    "TrustServerCertificate" => 1) ;
    
    $conn2 = sqlsrv_connect('localhost' , $conn_array);
    
    if ($conn2)
    {
    echo 'MSSQL Connection successful';
    }
    else
    {
    die( print_r( sqlsrv_errors(), true));
    }
    
    sqlsrv_close( $conn2 );

But i see error:

    Fatal error: Call to undefined function sqlsrv_connect() in C:\inetpub\wwwroot\89.111.180.28\index.php on line 18

Tell me please why i have error and how make the right ?

p.s.: server already was restarted.

Viewing all articles
Browse latest Browse all 391

Trending Articles