Skip to Content.
Sympa Menu

freetds - Odd problem round 2.

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Tim Uckun <tim AT diligence.com>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Odd problem round 2.
  • Date: Tue, 02 Jan 2001 12:59:18 -0700


I downloaded php4.04 , and got a CVS snapshot of freetds.
I compiled freetds with option --wth-tdsver=7.0
I attempted to run the following code

-------------
$server= sybase_connect('192.168.0.4' , 'web' , 'web');
$connectionID = sybase_select_db('crims', $server);

$SQL="select top 5 * from tblWebReportsAudit";

$queryID = sybase_query( $SQL,$connectionID);

while( $row = sybase_fetch_array($queryID) ){
foreach ($row as $key => $value) {
echo "$key-->$value ; ";
}

}
----------------

It does a segfault.
Here is the GDB output and back trace

-----------------
Attempting to convert unknown source type 104
Attempting to convert unknown source type 104
Attempting to convert unknown source type 104
Attempting to convert unknown source type 104
Attempting to convert unknown source type 104

Program received signal SIGSEGV, Segmentation fault.
0x4018f4a7 in memcpy (dstpp=0x81777e8, srcpp=0x8142a54, len=4294967295) at ../sysdeps/generic/memcpy.c:55
55 ../sysdeps/generic/memcpy.c: No such file or directory.
(gdb) bt
#0 0x4018f4a7 in memcpy (dstpp=0x81777e8, srcpp=0x8142a54, len=4294967295) at ../sysdeps/generic/memcpy.c:55
#1 0x80c9f36 in add_string_to_string (result=0xbfffe7dc, op1=0xbfffe7dc, op2=0x81710a4) at zend_operators.c:1004
#2 0x80f17cf in execute (op_array=0x8170f1c) at ./zend_execute.c:1389
#3 0x80cc478 in zend_execute_scripts (type=8, file_count=3) at zend.c:729
#4 0x80620b8 in php_execute_script (primary_file=0xbffff9d4) at main.c:1221
#5 0x80609b1 in main (argc=3, argv=0xbffffa34) at cgi_main.c:738

--------------------

NOTE:

There are 5 "Attempting to convert unknown source type 104" errors one for each row. If I change the statement to return more or less rows this stays consistent. I get one of these errors for each row.

Here is the structure of the table
CREATE TABLE [dbo].[tblWebReportsAudit] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[searchid] [int] NULL ,
[RefNo] [varchar] (50) NULL ,
[VendorID] [int] NULL ,
[Result] [varchar] (50) NULL ,
[Notes] [varchar] (150) NULL ,
[when_ts] [datetime] NULL ,
[done] [bit] NULL



:wq
Tim Uckun
Due Diligence Inc. http://www.diligence.com/ Americas Background Investigation Expert.
If your company isn't doing background checks, maybe you haven't considered the risks of a bad hire.





Archive powered by MHonArc 2.6.24.

Top of Page