Bug #3828: IIS Crashes
| From: | Eli at WebMgt dot com | Date: | Tue, 14 Mar 2000 14:12:48 +0000 |
| Subject: | Bug #3828: IIS Crashes | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-16788@lists.php.net to get a copy of this message | ||
From: Eli@WebMgt.com
Operating system: NT 4,0
PHP version: 3.0 Latest CVS (14/03/2000)
PHP Bug Type: ODBC related
Bug description: IIS Crashes
Hello.
Using PHP4 beta (downloaded 3/13(
The following code keep crashing with error 502 Bad Gateway.
Worse, it stops my IIS and All ODBC operations are not working until I stop and restart the service.
I have similar scripts with accessing the same code for query only that work. It might be a bug in
Insert/Updated operations.
The following code does not even tell me that the
$x= InsTreeCat($c1,0);
function is missing (I commented the include out) it just crashes. or it gives me
Parse error on line 8 (this line: // include( 'InsertTree.php' ); )
Please help.
Eli
-----------------
$db = odbc_connect("LNSD",""',"");
$sql = "Select ID, Name,Phone, URL, cat1,cat2,cat3,cat4 from Links";
$rc = odbc_prepare($db,$sql);
if (!odbc_execute($rc)) { echo "Whoops";} // *** Error
// include( 'InsertTree.php' );
while(odbc_fetch_row($rc)){
$OrgID=odbc_result($rc,'ID');
$url =odbc_result($rc,'URL');
$c1=odbc_result($rc,'Cat1');
$c2=odbc_result($rc,'Cat2');
$c3=odbc_result($rc,'Cat3');
$c4=odbc_result($rc,'Cat4');
$x= InsTreeCat($c1,0);
// echo "<BR>x=$x<br>";
if ($c2) {
$x= InsTreeCat($c2,$x);
if ($c3) {
$x= InsTreeCat($c3,$x);
if ($c4) {
$x= InsTreeCat($c4,$x);
}
}
}
$sql= "Update Links Set CatID=$x Where ID=$OrgID";
$sts = odbc_prepare($db,$sql);
if (!odbc_execute($sts)) { echo "Whoops";} // ** Error
if ($url)
echo "<li><a href=http://".
odbc_result($rc,'URL').">".odbc_result($rc,'Name')."</a>
".odbc_result($rc,'Phone');
else
echo "<li>".odbc_result($rc,'Name')."
".odbc_result($rc,'Phone');
}
odbc_close($db); // Close Connection ***