From:             php at thesheath dot com
Operating system: win2003
PHP version:      4.3.9
PHP Bug Type:     MSSQL related
Bug description:  Unable to connect to an mssql server using mysql_connect

Description:
------------
Webserver A is in an active directory VHOSTS, webserver B is in Active
directory VHOSTS2.  MSSQL Server A is in VHOSTS and MSSQL Server B is in
VHOSTS2.  If an attempt is made to connect to MSSQL Server A from
Webserver B using mssql_connect the connection fails.  However, if an
attempt is made to connect to MSSQL Server B from Webserver B using
mssql_connect, the connection will succeed.  This also applies if you
change the test around so webserver A connecting to MSSQL Server B.  This
is purely an internal connection with the only difference in the
webservers and ms sql servers is being they're in different domains.

Reproduce code:
---------------
<?php
  db_connect();
?>
<?php
function db_connect ()
{
  $db = mssql_connect ("sql2k230", "*****", "******");
  if (!$db) {
    echo "\nError connecting to SQL Server, User = '" . "" . "', p/w = '"
. "" . "' \n\n";
    die('Could not connect to server: ' . mssql_get_last_message());
  }
  $result = mssql_select_db ('master', $db);
  if (!$result) {
    die('Could not select database: ' . mssql_get_last_message());
  }
}
?>

Expected result:
----------------
The script above should have html included, in which case whatever html is
included should be produced in the browser after the db connect has taken
place.  Or a blank page if using the code only.

Actual result:
--------------
Warning: mssql_connect(): Unable to connect to server: sql2k227 in
e:\******** on line 28
Error connecting to SQL Server, User = '*****', p/w = '****' Could not
connect to server: 

-- 
Edit bug report at http://bugs.php.net/?id=31596&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31596&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31596&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31596&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31596&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31596&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31596&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31596&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31596&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31596&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31596&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31596&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31596&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31596&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31596&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31596&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31596&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31596&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31596&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31596&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31596&r=mysqlcfg

Reply via email to