|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31029 ISAPI module with IIS truncates fractional part of float values
Submitted: 2004-12-09 01:32 UTC Modified: 2004-12-09 08:08 UTC
From: heller at hellerim dot de Assigned:
Status: Not a bug Package: Variables related
PHP Version: 5.0.2 OS: windowsXP
Private report: No CVE-ID: None
 [2004-12-09 01:32 UTC] heller at hellerim dot de
Today I configured my system to run IIS with the PHP5.0.2 ISAPI module. When looking on a pricelist contained in my web application I found that the fractional part of the currency values was omitted (e.g. 4,00 ? instead of 4,95 ?). After reconfiguring my system to run with the cgi variant (same version) everything was as it should be (i.e. 4,95 ? displayed as 4,95 ?). To verify this bug I used a short script just printing 4.95 and obtained the corresponding results. Obviously this is not related to any database access as is the case with similar bugs which were reported earlier. The only difference between the two configurations is the executable configured with IIS. Actually, my system is using both executables: The base installation uses the ISAPI module, while the virtual directory with which I found the bug was reconfigured to override this setting and use the cgi module.

Reproduce code:
<?php print("" . 4.95); ?>

Expected result:
The output should be 4.95.

Actual result:
With php5isapi.dll I get 4 while using php5-cgi.exe yields 4.95.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-09 08:08 UTC]
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.

Duplicate of #31026
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Feb 24 16:01:27 2024 UTC