php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3828 IIS Crashes
Submitted: 2000-03-14 09:12 UTC Modified: 2002-10-01 13:42 UTC
From: Eli at WebMgt dot com Assigned:
Status: Not a bug Package: ODBC related
PHP Version: 3.0 Latest CVS (14/03/2000) OS: NT 4,0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Eli at WebMgt dot com
New email:
PHP Version: OS:

 

 [2000-03-14 09:12 UTC] Eli at WebMgt dot com
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 ***

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-01 13:42 UTC] hholzgra@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC