From:             dhf2 at buffalo dot edu
Operating system: Linux/Windows XP Pro
PHP version:      5.2.6
PHP Bug Type:     MSSQL related
Bug description:  mssql_connect() fails to connect to server

Description:
------------
I've been having some issues with mssql_connect. I'm trying to connect to
an MS-SQL 2000 database from PHP on a Linux server running PHP 5.1.6, but
the mssql_connect() function always gives me the same error message saying
it can't connect to the server.

I also tried connecting to the same server from my local machine (Windows
XP Pro, PHP 5.2.5) with the same results. However, I wrote a quick python
script using pymssql and that worked fine from this machine. I also set up
an ODBC connection on this machine and connected from PHP via
odbc_connect(), which also worked fine. The mssql_connect() problems are
the same whether mssql.secure_connection is set to Off or On in the php.ini

Reproduce code:
---------------
$db = mssql_connect('hostname', 'username', 'password');

if(!$db) {
    die('<h2>Massive failure</h2>');
}

Expected result:
----------------
Should connect to database not print any errors

Actual result:
--------------
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to
server: host.name.of.server in /var/www/html/filename.php on line 28



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

Reply via email to