ID: 30962 Updated by: [EMAIL PROTECTED] Reported By: richard dot quadling at bandvulc dot co dot uk -Status: No Feedback +Status: Bogus Bug Type: MSSQL related Operating System: Windows XP Pro SP2 PHP Version: 5.0.3 New Comment:
See bug #29292. Previous Comments: ------------------------------------------------------------------------ [2006-04-22 18:34:36] larry dot menard at rogers dot com I seem to be having this same problem on PHP 5.1.2 (on Windows XP). Simple test script: <?php $db = mssql_connect($server, $user, $pswd); if (!$db) die(); mssql_select_db($dbname); $rs = mssql_query('select g_theme from g2_AlbumItem where g_id = 7'); if (!$rs) die(); $row = mssql_fetch_array($rs); mssql_free_result($rs); var_dump($row); mssql_close($db); ?> Returns: C:\MyServer>php testMsSql_mssql.php array(2) { [0]=> string(1) " " ["g_theme"]=> string(1) " " } I know this is not correct, the actual content of that column is a 0-byte string: C:\MyServer>sqlcmd -d ... -S ... -U ... -P ... -e 1> select g_theme from g2_albumitem 2> go select g_theme from g2_albumitem g_theme -------------------------------- (1 rows affected) 1> select len(g_theme) from g2_albumitem 2> go select len(g_theme) from g2_albumitem ----------- 0 (1 rows affected) 1> select 'x' + g_theme + 'x' from g2_albumitem 2> go select 'x' + g_theme + 'x' from g2_albumitem ---------------------------------- xx (1 rows affected) 1> Is anyone still working on this? It's been about 10 months since this bug was last updated. (Unfortunately I do not have a PHP Build environment.) Thanks. ------------------------------------------------------------------------ [2005-06-21 20:59:48] robert dot sevcik at gmail dot com Hi, It'd be nice to see it working in php 5.1 because right now I am developing in php5. I've tried various php5 snaps and 5.0.4 stable without efect. I am on a Win2003 server and here is my try-case: <?php $c = mssql_pconnect('myserver'); $res = mssql_query('select top 1 Obrazek,len = len(Obrazek),bin = cast(Obrazek as varbinary) from katalog..Nabidka'); $a = mssql_fetch_assoc($res); //any method var_dump($a); print phpversion(); /* returns: array(3) { ["Obrazek"]=> string(1) " " ["len"]=> int(0) ["bin"]=> string(1) " " } 5.1.0-dev Thank you much :) */ ?> ------------------------------------------------------------------------ [2005-03-31 10:54:11] beschr at free dot fr Please ignore my precedent comment, the bug is still present in CVS. I test the mssql.dll today (latest snap: Built On: Mar 29, 2005 16:30 GMT) and the bug is still present. ------------------------------------------------------------------------ [2005-03-25 14:54:28] rantal at eoss dot ru Same problem still exist in php4 snapshot php4-win32-STABLE-200503230530.zip ------------------------------------------------------------------------ [2005-03-17 17:59:57] beschr at free dot fr I've got this problem too with php 5.0.3 on IIS/Windows XP Pro SP2. With the mssql.dll of this snaps: Built On: Mar 17, 2005 01:30 GMT it work great. So I think the correction in CVs is ok and you can close this bug. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/30962 -- Edit this bug report at http://bugs.php.net/?id=30962&edit=1