hy , i use iis 7.5 with php 5.6.2 and for sql server , mssql functions not working .
you need to instal the good unofficial_sql_server_driver for php for your php version.
this the link of my driver for iis and php i use :
[Only registered and activated users can see links. Click Here To Register...]
just unrar it , put the 2 files in your php/ext folder and add these 4 rows in your php.ini :
[PHP_PDO_SQLSRV_56_NTS]
extension=php_pdo_sqlsrv_56_nts.dll
[PHP_SQLSRV_56_NTS]
extension=php_sqlsrv_56_nts.dll
reboot iis and check if the install as ok with php manager
link for php manager if you don't have it:
[Only registered and activated users can see links. Click Here To Register...]
and this an example of php function to sql server:
<?php
$pseudo = $_POST['pseudo'];
$pass = $_POST['pass'];
$email = $_POST['email'];
$key = "2011";
$hdpass = md5("$key$pass");
$serverName = "(local)";
$uid = "database_account_name";
$pwd = "database_account_password";
$connectionInfo = array( "UID"=>$uid,"PWD"=>$pwd,"Database"=>"Auth");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false )
{
echo "Impossible de se connecter au serveur .\n";
die( print_r( sqlsrv_errors(), true));
}
$tsql = "INSERT INTO [Account]
([login_name]
,[password]
,[referral_id]
,[referral_code]
,[pcbang]
,[block]
,[withdraw_remain_time]
,[age]
,[auth_ok]
,[last_login_server_idx]
,[event_code]
,[server_list_mask]
,[result]
,[ip]
,[game_code]
,[gamecode]
,[login_event]
,[email])
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);";
$params = array($pseudo,$hdpass,0,0,0,0,0,18,1,1,0,0,0,0,0,0 ,0,$email);
$stmt = sqlsrv_query( $conn, $tsql, $params);
if( $stmt === false )
{
die( print_r( sqlsrv_errors(), true));
}
else if( $stmt === true )
{
echo $pseudo . ", merci d'avoir créé un compte sur notre site.<br />
A très vite sur notre serveur .<br />
RappelZ FamilY<br />";
}
sqlsrv_free_stmt( $stmt);
sqlsrv_close( $conn);
?>
this the base y use to create my website AccountCreator , it's working but need more work for security .
you can use this example for the sql_server php functions after have modded it to your idea .
link to the php sql_server Library:
[Only registered and activated users can see links. Click Here To Register...]
good night all :)