Skip to Content.
Sympa Menu

freetds - seg fault on MSSQL query

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Casey" <casey AT push.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: seg fault on MSSQL query
  • Date: Mon, 25 Mar 2002 14:30:24 -0500


I keep on seg faulting when inserting rows into my MSSQL 7.0 server. Here
is how the page is structured. I also get two rows inserted instead of
one and then the seg fault. It works fine when I move to IIS with no code
change, but who wants to use that :-)

<?php
if (empty($PHPSESSID)){
session_start();
require_once("oms.inc");
login_form();
}

ELSE
{
require_once("oms.inc");
login_form();

function redirect($URL)
{
echo "<script language='javascript'>";//
echo "function redirect(url){" ;
echo "document.location.href=url;}";
echo "redirect($URL)";
echo "</script>";
}
//if error checking passes then evaluate the username & pass for access
and write
//session, username, start_time to database.

oms_db_connect();
checkpass($username, $password);

$sessionid = $PHPSESSID;


$roster = mssql_fetch_array($result);

IF
($roster[rid] == $password)
{

mssql_query("INSERT INTO sysdba.USRACTVLOG (userName, sessId,
startTime) VALUES ('$username', '$sessionid', CURRENT_TIMESTAMP)",$link);

redirect("'http://mywebserver.net/~php/index.html'");
}
ELSE
{


unset($username, $password);

printf ("Invalid Password Supplied");
}

}

?>




Archive powered by MHonArc 2.6.24.

Top of Page