#35148 [Opn->Bgs]: mssql_connect does not work for username longer than 30 characters

From: Date: Tue, 08 Nov 2005 07:20:47 +0000
Subject: #35148 [Opn->Bgs]: mssql_connect does not work for username longer than 30 characters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-87827@lists.php.net to get a copy of this message
ID: 35148 Updated by: sniper@php.net Reported By: diptiporwal at gmail dot com -Status: Open +Status: Bogus Bug Type: MSSQL related Operating System: Win 2003 PHP Version: 4.4.1 New Comment: And this couldn't be more bogus. :) Previous Comments: ------------------------------------------------------------------------ [2005-11-08 08:20:27] sniper@php.net These bugs just make my day, thanks! :) You need to blame Microsoft for them making the maximum length of the username be 30 chars (the url might break, be aware): http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dblibc/dbc_pdc04e_3aya.asp There just couldn't be better way to wake up than this. :) ------------------------------------------------------------------------ [2005-11-08 06:10:52] diptiporwal at gmail dot com Description: ------------ Just trying to connect to MS sql server using mssql_connect, using the following line of code $conn = mssql_connect($DBServerName, $DBUser, $DBPassword); If the length of variable $DBUser exceeds 30 characters, it returns the following error:login failed for user(null) : Reason : Not a trusted connection associated with SQL server was found. Reproduce code: --------------- $conn = mssql_connect($DBServerName, $DBUser, $DBPassword); mssql_select_db($DBName, $conn); } Expected result: ---------------- Database connection should succeed with any length of characters below the max string length acceptable in php. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35148&edit=1

« previous php.bugs (#87827) next »