php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22618 Float number problems since php 4.2.3
Submitted: 2003-03-10 02:54 UTC Modified: 2003-03-11 01:41 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: mattiass at commentor dot se Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.3.1 OS: 2.4.19-16mdksecure
Private report: No CVE-ID: None
 [2003-03-10 02:54 UTC] mattiass at commentor dot se
Good morning,

As described in bug #21047 there is still a problem with the sybase ct library and float numbers (as described bellow)..

Configuration:
===========================
'./configure' '--with-apxs=/usr/local/apache/apache_1.3.27+php_4.3.1/bin/apxs' '--with-pear=/usr/local/Zend/pear' '--enable-magic-quotes' '--with-mysql' '--enable-trans-sid' '--enable-sockets' '--with-sybase-ct=/opt/sybase-11.9.2/' '--with-pdflib' '--enable-static-pdflib' '--enable-ftp' '--prefix=/usr/local/php/php_4.3.1' '--with-config-file-path=/usr/local/php/php_4.3.1/etc' '--with-pear=/usr/local/php/php_4.3.1/etc/pear' '--with-gd=/usr/local/lib' '--with-jpeg-dir' '--with-zlib' '--enable-bcmath' '--with-snmp' '--with-openssl' '--enable-sockets' '--with-curl' '--with-curlwrappers'

Software versions:
============================
Sybase 11.9.2
FreeTDS 0.60
Apache 1.3.27

Script:
============================
<?
$db = @sybase_connect("SYB_VALEN", "projuppf_test", "glasklar") or die (sybase_get_last_message());

$sql = 
"
select 
 convert(varchar(12), tr.datum, 112), 
 tt.typnamn, 
 tr.kommentar, 
 tr.fakturerbartiddef, 
 tr.anttimmar, 
 tr.initialer 
from 
 tidrapport tr, 
 tidtyp tt 
where 
 tr.projektnr = 7 and 
 tr.typid = tt.typid and 
 tr.datum between '20030101' and '20030131' 
order by 
 tr.datum
 ";

$rs = sybase_query($sql);

while (list($datum,$typnamn,$kommentar,$fakt,$timmar,$initialer) = sybase_fetch_array($rs))
{
echo $datum .", ". is_float($fakt) . ", ". is_float($timmar). "<br>\n";
}
?>

Output on php 4.3.1
=======================
20030102, 1, 1
20030103, , 
20030103, , 
20030107, , 
20030107, , 

Output in php 4.2.2
=======================
20030102, 1, 1
20030103, 1, 2
20030103, 1, 3
20030107, 1, 4
20030107, 1, 5

Aparently, after the first query, float numbers wont work

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-11 01:40 UTC] mattiass at commentor dot se
Sniper,

I just checked the latest cvs. I only copied the ext/sybase_ct lib over to php 4.3.1 since I have some serious issues with gd in the newer cvs builds.

And it works like a charm..

Case closed..! Thanks..
 [2003-03-11 01:41 UTC] mattiass at commentor dot se
Sniper,

I just checked the latest cvs. I only copied the ext/sybase_ct lib over to php 4.3.1 since I have some serious issues with gd in the newer cvs builds.

And it works like a charm..

Case closed..! Thanks..
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 12:01:27 2024 UTC