Bug #47304 [Asn->Wfx]: typecast of numeric string to float produces strange result

From: Date: Tue, 08 Jan 2013 07:29:39 +0000
Subject: Bug #47304 [Asn->Wfx]: typecast of numeric string to float produces strange result
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-175861@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=47304&edit=1

 ID:                 47304
 Updated by:         pajoye@php.net
 Reported by:        lennart dot vandendool at fonq dot nl
 Summary:            typecast of numeric string to float produces strange
                     result
-Status:             Assigned
+Status:             Wont fix
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   win32 only
 PHP Version:        5.2.9
 Assigned To:        pajoye
 Block user comment: N
 Private report:     N

 New Comment:

Happens only on some 2003/xp, system APIs bugs or locale error, we can't fix it. 
Also XP/2003 series won't be supported anymore in 5.5 or later, mark as 'won't 
fix'.


Previous Comments:
------------------------------------------------------------------------
[2011-09-12 13:29:51] michael dot fellinger at multitec-sono dot at

Similar Bug in PHP Version 5.3.5

My Code:
----------------------------------------------
$ADODB = new COM( 'ADODB.Connection' );
$ADODB->open($strConn);

$RS = $ADODB->execute("SELECT Lagerwert FROM tblStammdaten WHERE
tblStammdaten.Seriennummer='74925KR9';");
echo $RS->Fields(0)->Value . "<br>";
$x = sprintf("%f",$RS->Fields(0)->Value);
echo $x;
----------------------------------------------
gives following result:
-----------------------
1900
18:0.000000 
-----------------------------------------------
It only happends with the number or string 1900 and only if the execute command from the adodb
connection was performed.
I gues i also happens with other numbers.

------------------------------------------------------------------------
[2010-11-08 19:04:49] lennart dot vandendool at fonq dot nl

The same goes for php-5.3.3-nts-Win32-VC9-x86 on SBS 2003 (x86) and 2008 R2 (x64)

------------------------------------------------------------------------
[2010-11-08 18:54:24] lennart dot vandendool at fonq dot nl

I just tested php-5.3.3-Win32-VC9-x86 on Windows Server 2003 x86 and 2008 R2 x64. The problem
doesn't occur anymore.

------------------------------------------------------------------------
[2010-07-13 12:45:53] ola dot andersson at liko dot se

Thank you for your suggestion pajoye.

Neither php-5.3.2-nts-Win32-VC6-x86 or php-5.3.2-nts-Win32-VC9-x86 include the extension
php_mssql.dll. Without this extension I am not able to properly upgrade and test our systems with
this version of PHP. 

Howcome php_mssql is no longer included with the distributions?

------------------------------------------------------------------------
[2010-07-12 13:48:17] pajoye@php.net

Please try with 5.3.2 or 5.3.3RC2 VC9 version.

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


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

    https://bugs.php.net/bug.php?id=47304


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


Thread (35 messages)

« previous php.bugs (#175861) next »