#25777 [Com]: char and varchar fields are being rtrimmed (and also ltrimmed?) using freetds

2004-03-30 Thread arion_ at msn dot com
 ID:   25777
 Comment by:   arion_ at msn dot com
 Reported By:  duh at dowebwedo dot com
 Status:   Closed
 Bug Type: MSSQL related
 Operating System: Debian GNU/Linux 3.0
 PHP Version:  4.3.4RC1
 New Comment:

Description:



If a field is empty it returns one blank space character.



Reproduce code:

---

?php

$host=XXX;

$usuario=User;

$password=Password;

$bbdd=BBDD;

$conexion=mssql_connect($host,$usuario,$password);



$qry=SELECT  Field

FROM  dbo.Table;

$handle=mssql_query($qry);

$registro=mssql_fetch_row($handle);

$Nothing=$registro[0];

echo A .$Nothing. B;

?



Expected result:



AB



Actual result:

--

A B





I reported this here http://bugs.php.net/bug.php?id=26996 and I have
wait for the new release to solve this problem.



I've just test with 4.3.5 and doesn't works yet.


Previous Comments:


[2003-11-17 18:14:15] [EMAIL PROTECTED]

The sybase and mssql extensions do not handle returned data the exact
same way, and it might be that we need to readd the rtrim code to the
sybase extensions. It seams like the dbconvert() finctions are
implemented differently.



You could also try the native mssql extension. That will work with
FreeTDS as well, and give you more functions.



[2003-11-17 17:29:18] cquincy at whitewave dot com

I think I have run into a problem related to this bug fix.  I am using
sybase/freetds to interact with mssql on my company intranet like the
orginator of this bug.  Now with version 4.3.4 numbers, whether integer
of floating points are coming back with spaces on the right side.  i.e.
you put 123 in the database, then when you mssql_fetch* you get back
123   .  Note that the originator of the bug was only concerned with
char and varchar fields.  4.3.3 did not have this problem with numbers.
 So, it seems the fix has created an unforseen problem with numbers
which is worse in my opinion than hicoming back as hi.   





Obviously I expect to get exactly the same data that is stored in the
database instead of right padded data.



Expected result:



Put 123 in the database get back 123, not '123 '.  Put 123.456 in the
database get back 123.45, not '123.456 '



Thanks for your efforts.



[2003-10-14 23:32:13] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.





[2003-10-10 06:12:57] duh at dowebwedo dot com

the configure line is:



'./configure' '--with-mysql' '--with-apxs=/www/bin/apxs'
'--with-gd=/usr/local' '--with-png-dir' '--with-freetype-dir'
'--with-pear' '--with-zlib-dir' '--enable-track-vars'
'--enable-trans-sid' '--disable-posix-threads' '--enable-shared'
'--with-pgsql=/usr' '--with-unixODBC=/usr/local/easysoft/unixODBC'
'--with-mssql=/usr/local'



[2003-10-07 19:09:27] [EMAIL PROTECTED]

What was the configure line used to configure PHP?





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

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


#26996 [Bgs]: If a field is empty it returns one blank space character.

2004-01-26 Thread arion_ at msn dot com
 ID:   26996
 User updated by:  arion_ at msn dot com
 Reported By:  arion_ at msn dot com
 Status:   Bogus
 Bug Type: MSSQL related
-Operating System: Windows XP SP1
+Operating System: Windows
 PHP Version:  4.3.4
 New Comment:

I've read the bug report you sent me but. I only need to know if
there will be solution in future versions, if I must adapt all my
scripts using trim(), or to use 4.3.3 for ever.
Thanks.


Previous Comments:


[2004-01-21 14:43:26] [EMAIL PROTECTED]

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #25777 and add your comments there.




[2004-01-21 14:37:56] arion_ at msn dot com

I've just done and I'm sorry :( but 4.3.5RC2-dev doesn't work yet. If
you need I test something more, just tell me.

Thanks.

Running on Apache 2.0.48



[2004-01-21 14:22:47] [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





[2004-01-21 12:57:20] arion_ at msn dot com

Description:

If a field is empty it returns one blank space character.

Reproduce code:
---
?php
$host=XXX;
$usuario=User;
$password=Password;
$bbdd=BBDD;
$conexion=mssql_connect($host,$usuario,$password);

$qry=SELECT  Field
FROM  dbo.Table;
$handle=mssql_query($qry);
$registro=mssql_fetch_row($handle);
$Nothing=$registro[0];
echo Just .$Nothing. DoIt;
?

Expected result:

JustDoIt

Actual result:
--
Just DoIt





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


#26996 [NEW]: If a field is empty it returns one blank space character.

2004-01-21 Thread arion_ at msn dot com
From: arion_ at msn dot com
Operating system: Windows XP SP1
PHP version:  4.3.4
PHP Bug Type: MSSQL related
Bug description:  If a field is empty it returns one blank space character.

Description:

If a field is empty it returns one blank space character.

Reproduce code:
---
?php
$host=XXX;
$usuario=User;
$password=Password;
$bbdd=BBDD;
$conexion=mssql_connect($host,$usuario,$password);

$qry=SELECT  Field
FROM  dbo.Table;
$handle=mssql_query($qry);
$registro=mssql_fetch_row($handle);
$Nothing=$registro[0];
echo Just .$Nothing. DoIt;
?

Expected result:

JustDoIt

Actual result:
--
Just DoIt

-- 
Edit bug report at http://bugs.php.net/?id=26996edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26996r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26996r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=26996r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=26996r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26996r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=26996r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=26996r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=26996r=support
Expected behavior:  http://bugs.php.net/fix.php?id=26996r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=26996r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=26996r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=26996r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26996r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=26996r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=26996r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=26996r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26996r=float


#26996 [Fbk-Opn]: If a field is empty it returns one blank space character.

2004-01-21 Thread arion_ at msn dot com
 ID:   26996
 User updated by:  arion_ at msn dot com
 Reported By:  arion_ at msn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: MSSQL related
 Operating System: Windows XP SP1
 PHP Version:  4.3.4
 New Comment:

I've just done and I'm sorry :( but 4.3.5RC2-dev doesn't work yet. If
you need I test something more, just tell me.

Thanks.

Running on Apache 2.0.48


Previous Comments:


[2004-01-21 14:22:47] [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





[2004-01-21 12:57:20] arion_ at msn dot com

Description:

If a field is empty it returns one blank space character.

Reproduce code:
---
?php
$host=XXX;
$usuario=User;
$password=Password;
$bbdd=BBDD;
$conexion=mssql_connect($host,$usuario,$password);

$qry=SELECT  Field
FROM  dbo.Table;
$handle=mssql_query($qry);
$registro=mssql_fetch_row($handle);
$Nothing=$registro[0];
echo Just .$Nothing. DoIt;
?

Expected result:

JustDoIt

Actual result:
--
Just DoIt





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