From: mattiass at commentor dot se
Operating system: 2.4.19-16mdksecure
PHP version: 4.3.1
PHP Bug Type: Sybase-ct (ctlib) related
Bug description: Float number problems since php 4.2.3
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
--
Edit bug report at http://bugs.php.net/?id=22618&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22618&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22618&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22618&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22618&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22618&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22618&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22618&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22618&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22618&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22618&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22618&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22618&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22618&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22618&r=gnused