Skip to Content.
Sympa Menu

freetds - Re: memory leaks

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Wylie Swanson <wylie AT storerunner.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: memory leaks
  • Date: Thu, 18 May 2000 23:15:59 -0700


[Last message sent prematurely]

Here's the reported bugs:

Bug id #3690
Status: Open Modify
From: mike AT ftl.com
Date: 2000-03-01 13:28:47
Type: Reproduceable crash
OS: RedHat 6.1
PHP Version: 4.0 Latest CVS (01/03/2000)
Assigned To:
Short Desc.: mssql_fetch_row causes seg fault

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

[2000-03-01 13:28:47] mike AT ftl.com

Hi all,

Can anyone tell me why this core dumps apache.

while ($row=mssql_fetch_row($result)) {
echo implode(":",$row);
}

Looks valid to me....But with php4b5 and php3.0.15 it
seg faults apache.

I am running apache1.3.12, php4b5, freetds-0.50.

I have tried evrything with no success. I could get php4b4pl1 to
compile with sybase
support.

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

Bug id #4502
Status: Open Modify
From: salim AT sdv.fr
Date: 2000-05-18 15:23:20
Type: Sybase (dblib) related
OS: Linux RH 6.2
PHP Version: 4.0 Release Candidate 2
Assigned To:
Short Desc.: sybase_fetch_row stops before getting all rows

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

[2000-05-18 15:23:20] salim AT sdv.fr

compile line : --with-apxs=/usr/local/apache/bin/apxs
--with-sybase=/opt/sybase-11.9.2

Description:

I do a select using sysbase_query which is supposed
to return 2107 rows .
When I loop on sybase_fetch_row, I stops before 400 rows.
In fact the number is totally random, I got between
6 rows and 300 ..

Nota:
The remote server is a SqlServer 7.0
I used sybase server libraries but the problem occurs
if I use freetds sybase libs.
Most important, everything is fine when using php3.
with both sybase libs.

The script:

<html>
<body>

<?
function Error( $msg, $db )
{
echo "$msg \n";
sybase_close( $db);
exit();
}

$db=sybase_connect('sqlserver','user','pass');
if(!$db) Error("Error in sybase_connect",$db);

$cur=sybase_query("select * from test",$db);
if(!$cur) Error( "Error in sybase_query",$db);

echo "<table border=1><tr><th>value</th></tr>\n";
$nbrow=0;

while($row=sybase_fetch_row($cur))
{
echo "<tr><td align=center>$row[0]</td></tr>\n";
$nbrow++;
}

echo "<tr><td>$nbrow entries</td></tr></table>";
sybase_close($db);
?>
</body>
</html>



Wylie





Archive powered by MHonArc 2.6.24.

Top of Page