ID: 29292 Comment by: chris at fjmercedes dot com Reported By: jmelville at selectaustralasia dot com dot au Status: Open Bug Type: MSSQL related Operating System: Windows 2000 Server SP4 PHP Version: 4.3.8 New Comment:
I'm experiencing the same problem with the latest CVS of PHP5 and no php_mssql.dll extensions from older versions are compatable with PHP5. Previous Comments: ------------------------------------------------------------------------ [2004-08-10 16:38:51] jeremyirons at genevus dot com I've been having the same problem with 4.3.8. I swapped php_mssql.dll with versions from 4.3.7, 4.3.6, 4.3.5, 4.3.4, and 4.3.3. The space problem went away at 4.3.3 only. ------------------------------------------------------------------------ [2004-07-26 14:06:00] egarcia at egm dot as I have the same problem, this is related to the 4.3.8. To resolve for now, I'm using the mssql.dll extension from the 4.3.7 with the 4.3.8 with out problems. In the Zend Debugger now I see the nulls like null, no like " " with the 4.3.8 version. I hope that this litte trick can be usefull meanwhile. ------------------------------------------------------------------------ [2004-07-21 11:22:17] jmelville at selectaustralasia dot com dot au Description: ------------ Upgraded an existing server from PHP 4.3.2 to 4.3.8, Apache 1.3 on Windows 2000 SP4. Database is SQL Server 2000 SP4 on the same machine. All SQL queries that previously returned an empty string (e.g. the varchar column in the database contains an empty string and is not NULL) now return a single space character. I've confirmed in Query Analyser that the fields are definitely empty. Note the sample uses mssql_fetch_object() but I've also checked mssql_fetch_array() and it does the same thing. This is the same as bug #9854 but that bug is closed and refers to PHP 4.0.x, whereas this server has never run anything older than 4.3.x Thanks, Julian. Reproduce code: --------------- $sql = "SELECT TOP 5 * FROM jobs; $rs = mssql_query($sql); while ($job = mssql_fetch_object($rs)) { print "rec_id: '$job->rec_id' fax: '$job->fax' \n"; } Expected result: ---------------- rec_id: '45336' fax: '' rec_id: '40659' fax: '09 379 7785' rec_id: '44934' fax: '' Actual result: -------------- rec_id: '45336' fax: ' ' rec_id: '40659' fax: '09 379 7785' rec_id: '44934' fax: ' ' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29292&edit=1