Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > note 34393 deleted from ref.mssql by sniper
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 20th December 05:58
External User
 
Posts: 1
Default note 34393 deleted from ref.mssql by sniper


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>";

?>
// ------------------------------------------------ //
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666