php error 500 but cannot find mistake(s) -
php error 500 but cannot find mistake(s) -
i'm getting php error 500 (the type of error you'd if had php syntax error), cannot find error in php code (i've been doing php long time - trust me on this, it's simple code). cannot find mistake(s) because lines simple echos, , work individually, not together.
there 19 lines of echos within 4 levels of loops, , seem perhaps php getting overloaded amount of info or since it's 1 time have more 15 echos withing inner loop error. again, i've tried illustration removing lines 16-19 , works, or removing lines lines 1-4 , keeping lines 16-19 , works, etc, if have 19 lines gives error.
one other recent oddity could, perhaps, related: hosting site (awardspace.com) changed certificate settings, , warning when utilize phpmyadmin. have allowing me run number of echos @ time or something? i.e. have changed permissions?
ok, here's code anyway (i've written "problem starts here" lines start seem cause problem; 15 lines max within echo can present, otherwise error)...
<script language=javascript> <?php echo " var suitsymbols = new array(); suitsymbols['c'] = '<img src=club.png border=0>'; suitsymbols['d'] = '<img src=diamond.png border=0>'; suitsymbols['h'] = '<img src=heart.png border=0>'; suitsymbols['s'] = '<img src=spade.png border=0>'; var combos = new array(); var combos0 = new array(); //for seat0 var combos1 = new array(); //for seat1 var combost = new array(); //temp combos "; $squaretoequity = array(); $squaretoequity["aa"] = 1; $squaretoequity["kk"] = 1; $squaretoequity["qq"] = 2; $squaretoequity["jj"] = 2; $squaretoequity["tt"] = 3; $squaretoequity["99"] = 3; $squaretoequity["aks"] = 3; $squaretoequity["ako"] = 4; $squaretoequity["aqs"] = 4; $squaretoequity["ajs"] = 5; $squaretoequity["kqs"] = 5; $squaretoequity["ats"] = 6; $squaretoequity["88"] = 6; $squaretoequity["aqo"] = 7; $squaretoequity["kjs"] = 7; $squaretoequity["kts"] = 7; $squaretoequity["ajo"] = 8; $squaretoequity["qjs"] = 8; $squaretoequity["kqo"] = 9; $squaretoequity["a9s"] = 10; $squaretoequity["qts"] = 10; $squaretoequity["ato"] = 11; $squaretoequity["77"] = 11; $squaretoequity["kjo"] = 12; $squaretoequity["jts"] = 12; $squaretoequity["a8s"] = 13; $squaretoequity["k9s"] = 13; $squaretoequity["qjo"] = 14; $squaretoequity["a8s"] = 14; $squaretoequity["kto"] = 15; $squaretoequity["a7s"] = 15; $squaretoequity["a5s"] = 16; $squaretoequity["q9s"] = 16; $squaretoequity["66"] = 16; $squaretoequity["qto"] = 17; $squaretoequity["a6s"] = 17; $squaretoequity["j9s"] = 18; $squaretoequity["a9o"] = 19; $squaretoequity["t9s"] = 19; $squaretoequity["jto"] = 20; $squaretoequity["a4s"] = 20; $squaretoequity["k8s"] = 20; $squaretoequity["k7s"] = 21; $squaretoequity["a3s"] = 22; $squaretoequity["a8o"] = 22; $squaretoequity["k9o"] = 23; $squaretoequity["q8s"] = 23; $squaretoequity["a2s"] = 24; $squaretoequity["k6s"] = 24; $squaretoequity["j8s"] = 24; $squaretoequity["a7o"] = 25; $squaretoequity["t8s"] = 25; $squaretoequity["55"] = 26; $squaretoequity["q9o"] = 27; $squaretoequity["k5s"] = 27; $squaretoequity["98s"] = 27; $squaretoequity["j9o"] = 28; $squaretoequity["q7s"] = 28; $squaretoequity["a5o"] = 29; $squaretoequity["t9o"] = 30; $squaretoequity["a6o"] = 31; $squaretoequity["k8o"] = 32; $squaretoequity["k4s"] = 32; $squaretoequity["q6s"] = 33; $squaretoequity["j7s"] = 33; $squaretoequity["a4o"] = 34; $squaretoequity["t7s"] = 34; $squaretoequity["k3s"] = 35; $squaretoequity["97s"] = 35; $squaretoequity["87s"] = 35; $squaretoequity["k7o"] = 36; $squaretoequity["q5s"] = 36; $squaretoequity["44"] = 37; $squaretoequity["q8o"] = 38; $squaretoequity["a3o"] = 39; $squaretoequity["k2s"] = 39; $squaretoequity["j8o"] = 40; $squaretoequity["q4s"] = 40; $squaretoequity["t8o"] = 41; $squaretoequity["k6o"] = 42; $squaretoequity["j6s"] = 42; $squaretoequity["a2o"] = 43; $squaretoequity["98o"] = 44; $squaretoequity["t6s"] = 44; $squaretoequity["96s"] = 45; $squaretoequity["86s"] = 45; $squaretoequity["76s"] = 45; $squaretoequity["q3s"] = 46; $squaretoequity["j5s"] = 46; $squaretoequity["k5o"] = 47; $squaretoequity["q7o"] = 48; $squaretoequity["q2s"] = 48; $squaretoequity["j4s"] = 48; $squaretoequity["65s"] = 49; $squaretoequity["33"] = 49; $squaretoequity["j7o"] = 50; $squaretoequity["t7o"] = 51; $squaretoequity["k4o"] = 52; $squaretoequity["75s"] = 52; $squaretoequity["q6o"] = 53; $squaretoequity["t5s"] = 53; $squaretoequity["j3s"] = 54; $squaretoequity["95s"] = 54; $squaretoequity["87o"] = 55; $squaretoequity["85s"] = 55; $squaretoequity["97o"] = 56; $squaretoequity["t4s"] = 56; $squaretoequity["k3o"] = 57; $squaretoequity["j2s"] = 58; $squaretoequity["54s"] = 58; $squaretoequity["q5o"] = 59; $squaretoequity["t3s"] = 59; $squaretoequity["64s"] = 59; $squaretoequity["22"] = 60; $squaretoequity["k2o"] = 61; $squaretoequity["74s"] = 61; $squaretoequity["76o"] = 62; $squaretoequity["t2s"] = 62; $squaretoequity["q4o"] = 63; $squaretoequity["j6o"] = 64; $squaretoequity["84s"] = 64; $squaretoequity["86o"] = 65; $squaretoequity["94s"] = 65; $squaretoequity["t6o"] = 66; $squaretoequity["96o"] = 67; $squaretoequity["93s"] = 68; $squaretoequity["53s"] = 68; $squaretoequity["q3o"] = 69; $squaretoequity["j5o"] = 70; $squaretoequity["63s"] = 70; $squaretoequity["43s"] = 70; $squaretoequity["73s"] = 71; $squaretoequity["92s"] = 71; $squaretoequity["65o"] = 72; $squaretoequity["q2o"] = 73; $squaretoequity["j4o"] = 74; $squaretoequity["83s"] = 74; $squaretoequity["75o"] = 75; $squaretoequity["52s"] = 75; $squaretoequity["85o"] = 76; $squaretoequity["t5o"] = 77; $squaretoequity["82s"] = 77; $squaretoequity["95o"] = 78; $squaretoequity["j3o"] = 79; $squaretoequity["54o"] = 80; $squaretoequity["62s"] = 80; $squaretoequity["t4o"] = 81; $squaretoequity["42s"] = 81; $squaretoequity["j2o"] = 82; $squaretoequity["64o"] = 83; $squaretoequity["72s"] = 83; $squaretoequity["t3o"] = 84; $squaretoequity["32s"] = 85; $squaretoequity["84o"] = 86; $squaretoequity["74o"] = 86; $squaretoequity["t2o"] = 87; $squaretoequity["94o"] = 88; $squaretoequity["53o"] = 89; $squaretoequity["93o"] = 90; $squaretoequity["63o"] = 91; $squaretoequity["43o"] = 92; $squaretoequity["92o"] = 93; $squaretoequity["73o"] = 94; $squaretoequity["83o"] = 95; $squaretoequity["82o"] = 96; $squaretoequity["52o"] = 96; $squaretoequity["42o"] = 97; $squaretoequity["62o"] = 98; $squaretoequity["72o"] = 99; $squaretoequity["32o"] = 100; $numtorank = array(); $numtorank[14] = "a"; $numtorank[13] = "k"; $numtorank[12] = "q"; $numtorank[11] = "j"; $numtorank[10] = "t"; $numtorank[9] = 9; $numtorank[8] = 8; $numtorank[7] = 7; $numtorank[6] = 6; $numtorank[5] = 5; $numtorank[4] = 4; $numtorank[3] = 3; $numtorank[2] = 2; $nodescreated = array(); //carda for($ranka=14;$ranka>1;$ranka--){ $ra = $numtorank[$ranka]; for($suita=3;$suita>-1;$suita--){ $sa = $numtosuit[$suita]; //cardb for($rankb=$ranka;$rankb>1;$rankb--){ $rb = $numtorank[$rankb]; for($suitb=3;$suitb>-1;$suitb--){ $sb = $numtosuit[$suitb]; if($ranka == $rankb && $suita == $suitb){ //skip: same card - not possible combo } else if(strcmp($ranka,$rankb)==0 && $suitb>$suita){ //skip: did combo. example: kdkc done, not kckd. } else{ //it's valid combo if($nodescreated[$ranka] != 1){ echo " combos[".$ranka."] = new array(); combos0[".$ranka."] = new array(); combos1[".$ranka."] = new array(); combost[".$ranka."] = new array(); "; $nodescreated[$ranka] = 1; } if($nodescreated[$ranka."|".$suita] != 1){ echo " combos[".$ranka."][".$suita."] = new array(); combos0[".$ranka."][".$suita."] = new array(); combos1[".$ranka."][".$suita."] = new array(); combost[".$ranka."][".$suita."] = new array(); "; $nodescreated[$ranka."|".$suita] = 1; } if($nodescreated[$ranka."|".$suita."|".$rankb] != 1){ echo " combos[".$ranka."][".$suita."][".$rankb."] = new array(); combos0[".$ranka."][".$suita."][".$rankb."] = new array(); combos1[".$ranka."][".$suita."][".$rankb."] = new array(); combost[".$ranka."][".$suita."][".$rankb."] = new array(); "; $nodescreated[$ranka."|".$suita."|".$rankb] = 1; } if($nodescreated[$ranka."|".$suita."|".$rankb."|".$suitb] != 1){ echo " combos[".$ranka."][".$suita."][".$rankb."][".$suitb."] = new array(); combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."] = new array(); combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."] = new array(); combost[".$ranka."][".$suita."][".$rankb."][".$suitb."] = new array(); "; $nodescreated[$ranka."|".$suita."|".$rankb."|".$suitb] = 1; } $color = ""; if($suita == $suitb){ $suitedness = "s"; $suited = 1; $handtype = 1; //1 highcard $color = "pink"; } else if($ranka == $rankb){ $suitedness = ""; //pocket pair, assumed offsuit $suited = 0; $handtype = 2; //2 pair $color = "lightgreen"; } else{ $suitedness = "o"; $suited = 0; $handtype = 1; //1 highcard $color = "lightblue"; } $square = $numtorank[$ranka]."".$numtorank[$rankb]."".$suitedness; $handpercent = $squaretoequity[$square]; //problem starts here echo " combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['handtype'] = ".$handtype."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['handpercent'] = ".$handtype."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['totalpercent'] = ".$handtype."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentsfd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentfd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentsd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypesfd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypefd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypesd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suited'] = ".$suited."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['sfd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['fd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['sd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['rankhighcard'] = ".$ranka."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['ranklowcard'] = ".$rankb."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suithighcard'] = ".$suita."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suitlowcard'] = ".$suitb."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['flopbottompercent'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['color'] = ".$color."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['handtype'] = ".$handtype."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['handpercent'] = ".$handpercent."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['totalpercent'] = ".$handpercent."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentsfd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentfd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentsd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypesfd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypefd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypesd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suited'] = ".$suited."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['sfd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['fd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['sd'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['rankhighcard'] = ".$ranka."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['ranklowcard'] = ".$rankb."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suithighcard'] = ".$suita."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suitlowcard'] = ".$suitb."; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['flopbottompercent'] = 0; combos[".$ranka."][".$suita."][".$rankb."][".$suitb."]['color'] = '".$color."'; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['handtype'] = ".$handtype."; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['handpercent'] = ".$handpercent."; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['totalpercent'] = ".$handpercent."; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentsfd'] = 0; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentfd'] = 0; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentsd'] = 0; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypesfd'] = 0; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypefd'] = 0; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypesd'] = 0; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suited'] = ".$suited."; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['sfd'] = 0; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['fd'] = 0; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['sd'] = 0; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['rankhighcard'] = ".$ranka."; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['ranklowcard'] = ".$rankb."; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suithighcard'] = ".$suita."; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suitlowcard'] = ".$suitb."; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['flopbottompercent'] = 0; combos0[".$ranka."][".$suita."][".$rankb."][".$suitb."]['color'] = '".$color."'; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['handtype'] = ".$handtype."; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['handpercent'] = ".$handpercent."; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['totalpercent'] = ".$handpercent."; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentsfd'] = 0; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentfd'] = 0; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentsd'] = 0; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypesfd'] = 0; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypefd'] = 0; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypesd'] = 0; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suited'] = ".$suited."; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['sfd'] = 0; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['fd'] = 0; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['sd'] = 0; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['rankhighcard'] = ".$ranka."; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['ranklowcard'] = ".$rankb."; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suithighcard'] = ".$suita."; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suitlowcard'] = ".$suitb."; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['flopbottompercent'] = 0; combos1[".$ranka."][".$suita."][".$rankb."][".$suitb."]['color'] = '".$color."'; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['handtype'] = ".$handtype."; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['handpercent'] = ".$handpercent."; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['totalpercent'] = ".$handpercent."; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentsfd'] = 0; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentfd'] = 0; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawpercentsd'] = 0; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypesfd'] = 0; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypefd'] = 0; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['drawtypesd'] = 0; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suited'] = ".$suited."; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['sfd'] = 0; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['fd'] = 0; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['sd'] = 0; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['rankhighcard'] = ".$ranka."; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['ranklowcard'] = ".$rankb."; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suithighcard'] = ".$suita."; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['suitlowcard'] = ".$suitb."; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['flopbottompercent'] = 0; combost[".$ranka."][".$suita."][".$rankb."][".$suitb."]['color'] = '".$color."'; "; } } } } } ?> </script>
ok, testing code, plenty of undefined variable: numtosuit in error logs, plenty of: undefined index: 2|1|2.
so, first of all, numtosuit undefined, missing code provided?
i suggest @ error logs, informative.
i see 'awardspace.com' doesn't allow see logs, suggest install xampp or wamp , run code on computer first, check out logs see happening, upload final version hosted website (a.k.a publish site).
as sec question, certificates, pretty sure "echo" problem facing has nil that. certificate there found secure connection between browser , server, won't limit in way info sent under such communication. guess error received in phpmyadmin because certificate has signing issue (?).
php
Comments
Post a Comment