From:             cross_phil at hotmail dot com
Operating system: win32
PHP version:      Irrelevant
PHP Bug Type:     MSSQL related
Bug description:  Can't connect in specific scenarios.

Description:
------------
I am having trouble connecting to my MS SQL database from an external
network address.  When I am at work connecting locally this code works
fine.  When I am outside the building, it fails with the error mentioned
in "Actual Result".  It does not appear to be a IP or a firewall issue
because I can connect with the query analyser and other MS tools just
fine.  Seems like some sort of network transport issue.  I can work around
it using the COM example listed on the MS SQL documentation/user comments
but I have libraries build around the SQL functions that I would rather
use if I can figure this out.  I am mainly asking to try to determine why
this function would act different in different network scenarios.

Reproduce code:
---------------
<?php
//Note: I am not disclosing my authentication for obvious reasons but my
original code did have real quoted values.
mssql_connect(MY_IP, MY_UNAME, MY_PASS)
     or die('Error connecting');
echo 'success'
?>


Expected result:
----------------
success

Actual result:
--------------
Warning: mssql_connect(): Unable to connect to server: 68.111.105.35 in
e:\bigdogdealer.net\bigdogmotorcycles.net\php\dealer\test.php on line 10
Error connecting

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

Reply via email to