[php-maint] Bug#620948: php5-sybase: php5 segmentation fault when trying to convert money value from MS-SQL-SERVER
thomas at dimipro.fr
Tue Apr 5 08:48:33 UTC 2011
In order to test my php5 applications on Debian Squeeze, I upgraded from
Debian Lenny to Squeeze on a test machine.
Tests on Debian Squeeze have shown me that php5 causes segmentation
fault when a script try to query MS-SQL-SERVER.
I use php5-sybase (freetds-bin, freetds-common) for connect to
Actually the bug occurs when I query a row which contains a money type
column. If there isn't a money type column in the row,
the script doesnt't return segmentation fault. I have seen this when I
activated log on freetds, and freetds seem to shutdown on:
dblib.c:2141:dbconvert((nil), SYBMONEY, 0x2cfd858, 8, SYBFLT8,
I can see that a similar BUG exist on PHP: #52546
but I don't know whether this patch was integrated on the current
release of php5-sybase.
On Debian Lenny with the excatly same configuration, I have no problem.
A tsql session which query a row containing a money type value works
(Prix and Montant are money columns, yes I'm french :) )
$ tsql -S gestion -U Toto -P Toto
locale is "fr_FR at euro"
locale charset is "ISO-8859-15"
1> use Test;
2> SELECT * FROM ArticleStock WHERE Article=100 AND Site=3;
Article Site Stock Prix Montant DateCreation DateSaisie
100 3 0 242.76 0.00 2007-10-24 16:53:51 2008-07-10
(1 row affected)
I can't solve the problem for the moment and I have to stay on Debian
I can send, if necessary, two full log samples of freetds (one from
Lenny and the other from Squeeze) of the same query test.
My configuration of freetds:
# TDS protocol version
; tds version = 4.2
# Whether to write a TDSDUMP file for diagnostic
# (setting this to /tmp is insecure on a
# multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff
# Command and connection timeouts
; timeout = 10
; connect timeout = 10
text size = 64512
host = 192.168.2.2
port = 11111
tds version = 7.0
;dump file = /tmp/freetds.log
date format = %Y-%m-%d %%H:%M:%S
MS-SQL-SERVER Version: SQL EXPRESS 2005 9.0.3042
php5-sybase version: 5.3.3-7+squeeze1
-- System Information:
Debian Release: 6.0.1
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR at euro, LC_CTYPE=fr_FR at euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/dash
Versions of packages php5-sybase depends on:
ii libapache2-mod-php5 [ph 5.3.3-7+squeeze1 server-side, HTML-embedded scripti
ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib
ii libsybdb5 0.82-7 libraries for connecting to MS SQL
ii php5-cli [phpapi-200906 5.3.3-7+squeeze1 command-line interpreter for the p
ii php5-common 5.3.3-7+squeeze1 Common files for packages built fr
php5-sybase recommends no packages.
php5-sybase suggests no packages.
-- no debconf information
More information about the pkg-php-maint