Thursday 5 December 2013

IIS PHP configuration in Windows 7

IIS = PHP manger = sqlsrv = sql Native client = windows7 = PHP 5.4
================================================
1.Enable IIS in windows feature.

2.Install IIS manager for PHP

3.Register new PHP cgi-app in IIS manger

4.Enable (download PHP version related sqlsrv54 for php5.4 sqlsrv for php5.2)

5.open php.in file in txt format and enable it in corresponding method(uncommnet ; add text in extension)

6.Install sql native client

7.conn.php in inetpub->hms->conn.php run this file.(make array format connection,direct not accepted.)

<?php
$serverName = "localhost";
$database="hms";
$uid='sa';
$password='pass123';
$connectionInfo = array( "Database"=>$database, "UID"=>$uid, "PWD"=>$password);
$conn = sqlsrv_connect( $serverName, $connectionInfo );
//sqlsrv_configure('WarningsReturnAsErrors',0);
if( $conn === false ) {
    die( print_r( sqlsrv_errors(), true));
}

echo 'connected';
?>

No comments:

Post a Comment