php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19374 Float values are not correctly handled when fetching data from MS SQL Server 7
Submitted: 2002-09-12 07:24 UTC Modified: 2002-10-20 23:20 UTC
From: chemolli dot francesco at usi dot unicredit dot it Assigned:
Status: No Feedback Package: Sybase (dblib) related
PHP Version: 4CVS-2002-09-12 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: chemolli dot francesco at usi dot unicredit dot it
New email:
PHP Version: OS:

 

 [2002-09-12 07:24 UTC] chemolli dot francesco at usi dot unicredit dot it
If a table on a MS SQL Server (verified on version 7.0) contains a float field, that float is always returned as 0.
This problem has been verified using any version of the freetds library from 0.53 to today's snapshot, and PHP 4.1.1, 4.2.2 and today's snapshot.
The problem is NOT in the freetds library, performing the queries from tsql or sqsh returns the correct values.

The problem does _NOT_ show when using the ct-library.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-30 19:34 UTC] iliaa@php.net
If you change the locale to english via setlocale(LC_NUMERIC, 'POSIX'); does it fix the problem?
 [2002-10-01 02:49 UTC] chemolli dot francesco at usi dot unicredit dot it
Can it be done via env. variables? I'm on a production system, and I'm wary of hand-patching.
 [2002-10-01 06:36 UTC] iliaa@php.net
Yes it can be done via ENV variables, setlocale() is a PHP function which allows you to set locate related enviroment variables.
 [2002-10-01 06:48 UTC] hholzgra@php.net
adding

  LANG=POSIX
  export LANG

to your webserver start script should do the job

please verify in phpinfo() output that it is really used
 [2002-10-20 23:20 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 00:01:30 2024 UTC