ID:               29383
 Comment by:       bhiggins at gmail dot com
 Reported By:      gunther at ultraconsulting dot com
 Status:           No Feedback
 Bug Type:         MSSQL related
 Operating System: Windows 2000
 PHP Version:      4.3.7, 5.0.0
 New Comment:

We are experiencing this bug with PHP 5.1.2 and sybase-ct.

I can't believe this has gone unfixed for so long.


Previous Comments:
------------------------------------------------------------------------

[2005-09-06 16:52:16] mcknight at chek dot com

Since it seems that no one wants to work on this we made the changes we
needed to the source and recreated the dll.  If you are having the same
problem you can either build a new php_mssql.dll or email me for a copy
of ours.

------------------------------------------------------------------------

[2005-08-02 00:12:09] mcknightj at lovullo dot com

To answer the question from 13 Dec 2004, the current snapshot links are
displaying the same problem.

Also the bug is currently listed as 'No feedback', is there a way to
roll it back to open again??  Don't want to go through and open a new
bug with the same problem.

------------------------------------------------------------------------

[2005-07-28 20:25:37] mcknightj at lovullo dot com

Not sure if I missed where this was addressed, but I'm having this
problem after upgrading from 4.3.2 to 4.3.11.  We're using php on
windows 2003 IIS and have reviewed both this bug report and bug #29292
(listed as bogus).

Reviewing the problem it looks like an empty column is being returned
as a single space value.  Null values are being correctly returned but
empty varchar fields are not.  I have reviewed the data in enterprise
manager, php through IIS, ????, and access through ODBC.  In all the
cases null's are reported as nulls, strings as strings and empty
columns as empty columns (except php).  This is probably a problem with
the windows db library and not php but it would be easier to correct
here rather then php code until microsoft updates their library.

Here is an example of what results we get.
DATA:
        id      |       name
==============================
        1       |       'my name'
        2       |       <NULL>
        3       |       ''

PHP: [echo $result['id']." - '".$result['name']."'";]
        1 - 'my name'
        2 - ''
        3 - ' '



The change happened around 4.3.4 with the following change in
php_mssql.c:
#if ilia_0
        while (length>0 && data[length-1] == ' ') { /* nuke trailing
whitespace */
                length--;
        }
#endif


Maybe this could be updated to the following to handle the single space
problem with empty strings:
        if (length == 1 && data[0] == ' ') { /* nuke whitespace from empty
string */
                length = 0;
                data = '';
        }

Please let me know if you need any additional info or let me know if a
work around is already present (other then reverting back to 4.3.3).

------------------------------------------------------------------------

[2004-12-21 01:00:12] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2004-12-13 07:30:15] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



------------------------------------------------------------------------

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/29383

-- 
Edit this bug report at http://bugs.php.net/?id=29383&edit=1

Reply via email to