Skip to Content.
Sympa Menu

freetds - Re: PHP crash on 2nd Select

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Dale Kortum" <dkortum AT mdmgrse.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: PHP crash on 2nd Select
  • Date: Fri, 13 Jul 2001 12:03:01 -0400


We have gathered more information about the problem. It appears that the
second select will work if we odbc_result_all for the first select prior
to the second select. The script that does not function is listed below.
We think the problem may lie in token.c:tds_submit_query. The state field
in the TDS structure indicates TDS_PENDING, which generates the error.
The original crash was caused in log_error attempting to do a string copy
from a NULL pointer (not a pointer to NULL). We changed the function to
check for a NULL to get by this problem. But we still have the error
condition on the 2nd select. Thanks for any assistance you can provide.

<?
print "here at connection\n";
$odbcConnectID = odbc_connect("DSNname", "UID", "PWD");
if (! $odbcConnectID) {
print "<BR><BR>Cannot connect.<BR><BR>";
print "<BR><BR>";
exit;
}
$query = "select * from CallPage";
$result = odbc_exec($odbcConnectID, $query);
print "set 1\n";
$query = "select * from Location";
$result = odbc_exec($odbcConnectID, $query);
print "set 2\n";
$query = "SELECT * from CallPage";
$result = odbc_exec($odbcConnectID, $query);
print "set 3\n";
exit;
?>




Archive powered by MHonArc 2.6.24.

Top of Page