FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Too many re-directs problem?





welshsteve
HI everyone, I'm getting the following message in Google Chrome (other browsers appear to be fine).

This web page has a redirect loop
The web page at http://mobile.ldbsa.co.uk/mob_cup_singles.php has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
Here are some suggestions:
Reload this web page later.
Learn more about this problem.
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.


There is no re-direction script at all on this page. Here's the code.

Code:


<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN"
  "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
   <title>Leamington &amp; District Billiards &amp; Snooker Association</title>
   <link rel="stylesheet" href="styles.css" type="text/css" />
<!-- SCRIPT FOR SHOWING OR HIDING FRAMES SCORES -->
<script type="text/javascript">
function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}
</script>
<!-- END SCRIPT -->
</head>
<body>
<img src="logo.jpg" style="width:60px;height:53px;" alt="LDBSA" />
<h1>Leamington &amp; District Billiards &amp; Snooker Association</h1>
<h2>Snooker Competitions</h2>
<p><a href="index.php"><< Back to Home Page</a> | <a href="mob_comps.php"><< Back to main competitions page</a></p>
<hr />
<h3>EJ Riley Individual Singles</h3>
      <p>Choose a round from the drop down list below.  Click the <img src="info_sml.gif" style="display:inline;border:0;" alt="Info Icon" /> for more details.</p>
      <div>
         <form action="mob_cup_singles.php" method="post" name="roundselect">
         <select name="selectround">
            <option value="holder"> Please select a round...</option>
               <option value="1"> 1st Round</option>
               <option value="2"> 2nd Round</option>
               <option value="3"> 3rd Round</option>
               <option value="4"> Quarter Finals</option>
               <option value="5"> Semi Finals</option>
               <option value="6"> Final</option>
         </select>
         <input type="submit" name="btnSubmit1" id="btnSubmit1" class="btn" value="Show Results" />
            </form>
      </div>
<?php
$con = mysql_connect("db1320.oneandone.co.uk","dbo233443736","zgeZwmTf");
if (!$con)
  {
  die('Could not connect: ' . mysql_error() . '<br /><br />Please contact the website administrator');
  }

mysql_select_db("db233443736", $con);
$round = mysql_real_escape_string(stripslashes($_POST["selectround"]));
//$round = $_POST["selectround"];
//$round = mysql_real_escape_string($round);

//ADDED THIS BIT
if (!empty($round)) {
    //do the query
    //display results
$sql = "SELECT * FROM Cup_Singles WHERE Round = ".$round. " ORDER BY MatchNo;";
//echo $sql;
$result = mysql_query($sql);

if (!$result)
echo mysql_error();

echo "<table class='results'>";
echo "<tr><th colspan='4'>ROUND " . $round . "</th></tr>";

while($row = mysql_fetch_array($result))
  {
      echo "<tr><td class='fix'>" . $row["HPlayer"] . " (" . $row["HClub"] . ")</td><td class='fixv'>" . $row["HScore"] . "&nbsp;-&nbsp;" . $row["AScore"] . "</td><td class='fix'>" . $row["APlayer"] . " (" . $row['AClub'] . ")</td><td class='fixv'><a href='javascript:toggleLayer(\"Round" . $row["Round"] . "-" . $row["MatchNo"] ."\");'><img src='info_sml.gif' style='border:0;' alt='Info' /></a></td></tr>";
      echo "<tr><td colspan='4' style='margin:0;padding:0;'><table id='Round" .$row["Round"]. "-" .$row["MatchNo"]. "' style='width:100%;border-collapse:collapse;display:none;'>";
      echo "<tr><td class='extrainfo' style='width:390px;'>&nbsp;<strong>Extra Info:</strong><br />&nbsp;" . $row["Breaks"] . "</td></tr></table></td></tr>";
  }
echo "</table>";
}
else echo "No round selected";

mysql_close($con);
?>
</body>
</html>


Is anyone able to help? I'm able to clear it by clearing the browsing data. Is this simply another example of Google Chrome's dreadful handling of cached data? I'm really going off the browser if I'm honest
jmraker
It isn't redirecting for me in Google Chrome 15.x or the latest version 16.x ( It just upgraded while I was checking it's version number )

I might be wrong but you should be able to rule out javascript on this because you should only see that if it sees too many "Location: " in the http headers. After so many location changes browsers begin to assume that it'll keep redirecting endlessly.

If clearing the cache fixes it was a problem with the browsers cache. Maybe there was once a redirect loop and it's cache still has the old http headers with the location change.
welshsteve
It's definitely a browser cache issue. I've encountered this before with Google Chrome. It may be the fastest and sleakest browser, but it does cause some major headaches sometimes with it's poor cache clearing and flash plugin failures.
Related topics
Facing Many Problems
same problem over here...
Boot disk problem.
[RESOLVED] So many Problems
Slight Server Problem
which top 10 site do you visit frequently?
terrorism in israel
Problem with session variables
Please Help Packet Problem
problem with my internet explorer
Do we have Free Will or is there only Determinism?
Muslim speaks out...
How to organize your work
My 3d models (Updated)
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.