|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-10-01 13:42 UTC] hholzgra@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
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 ***