note 34393 deleted from ref.mssql by sniper

From: Date: Mon, 17 Nov 2003 22:58:35 +0000
Subject: note 34393 deleted from ref.mssql by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-60536@lists.php.net to get a copy of this message
Note Submitter: nogitsune101@hotmail.com ---- Web Server Type: Windows 2000 Server - IIS 5 SQL Server Type: SQL 2000 ------------------------------------------------- Just thought I would put this up since I saw several people having this issue. Few things that need to be done to get this to work: 1. Install the MS SQL 2000 Client Tools on your Server 2. Using the "Client Network Utility" set up an Alias 3. Edit your PHP.INI file to include the php_mssql.dll extension file. 4. Restart your IIS Service If you get a "Access Denied" message you need to go to your "\WINNT\SYSTEM32" directory and find the "ntwdblib.dll" Add the group "Everyone" to the security with "Read" and "Read - Execute" access. Then restart your IIS Service again. Here is a peice of sample code you can use to test your MS SQL access. // ------------------------------------------------ // <?php $msserver="MsServerAlias"; //put your server alias here $usrname="user"; //put your MS SQL username here $passwrd="password"; //put your MS SQL password here $conn=mssql_connect($msserver,$usrname,$passwrd); if ($conn) $body.= "<font color='blue'>Connection to $msserver was successful.</font><hr>"; else $body.="<font color='red'>Error: ".mssql_get_last_message()."</font><hr>"; $conn=mssql_close(); if ($conn) $body.= "<font color='blue'>Connection to $msserver was successfully closed.</font><hr>"; else $body.="<font color='red'>Error: ".mssql_get_last_message()."</font><hr>"; ?> // ------------------------------------------------ //

« previous php.notes (#60536) next »