8 Replies - 3083 Views - Last Post: 26 November 2012 - 09:42 PM Rate Topic: -----

#1 izic  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 197
  • Joined: 15-January 09

Webpage isn't available, connection to localhost was interrupted e

Posted 24 November 2012 - 04:02 PM

I keep getting the error shown in the topic title. Then I get a list of suggestions:

Here are some suggestions:
Reload this webpage later.
Check your Internet connection. Restart any router, modem, or other network devices you may be using.
Add Google Chrome as a permitted program in your firewall's or antivirus software's settings. If it is already a permitted program, try deleting it from the list of permitted programs and adding it again.
If you use a proxy server, check your proxy settings or contact your network administrator to make sure the proxy server is working. If you don't believe you should be using a proxy server, adjust your proxy settings: Go to the Chrome menu > Settings > Show advanced settings... > Change proxy settings... > LAN Settings and deselect the "Use a proxy server for your LAN" checkbox.
Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.

I tried the first and last suggestions but they didn't work and I doubt the second suggestion will make a difference. How can I fix this problem?

<?php 

error_reporting(E_ALL);
ini_set('display_errors', '1');
?>
<?php 
// Run a select query to get my letest 6 items
// Connect to the MySQL database  
include "../storescripts/connect_to_mysql.php"; 
$dynamicList = "";
$sql = mysql_query("SELECT * FROM products ORDER BY date_added DESC LIMIT 6");
$productCount = mysql_num_rows($sql); // count the output amount
if ($productCount > 0) {
	while($row = mysql_fetch_array($sql)){ 
             $id = $row["id"];
			 $product_name = $row["product_name"];
			 $price = $row["price"];
			 $date_added = strftime("%b %d, %Y", strtotime($row["date_added"]));
			 $dynamicList .= '<table width="100%" border="0" cellspacing="0" cellpadding="6">
        <tr>
          <td width="17%" valign="top"><a href="product.php?id=' . $id . '"><img style="border:#666 1px solid;" src="inventory_images/' . $id . '.jpg" alt="' . $product_name . '" width="77" height="102" border="1" /></a></td>
          <td width="83%" valign="top">' . $product_name . '<br />
            $' . $price . '<br />
            <a href="product.php?id=' . $id . '">View Product Details</a></td>
        </tr>
      </table>';
    }
} else {
	$dynamicList = "We have no products listed in our store yet";
}
mysql_close();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Store Home Page</title>
<link rel="stylesheet" href="../style/style.css" type="text/css" media="screen" />
</head>
<body>
<div align="center" id="mainWrapper">
  <?php include_once("template_header.php");?>
  <div id="pageContent">
  <table width="100%" border="0" cellspacing="0" cellpadding="10">
  <tr>
    <td width="32%" valign="top"><h3>Welcome to Angie's Art!</h3>
      <p>This website is very temporarily being used as an online live showcase area for an E - Commerce tutorial script set Adam is creating which can be seen on his channel here:<br />
        <a href="http://www.youtube.com/flashbuilding" target="_blank">http://www.youtube.com/flashbuilding</a> </p>
      <p>It is not an actual store and it will change directly after the tutorial series. <br />
        <br />
        This tutorial series is for educational purposes only. Use the scripts at your own risk.</p></td>
    <td width="35%" valign="top"><h3>Latest Designer Fashions</h3>
      <p><?php echo $dynamicList; ?><br />
        </p>
      <p><br />
      </p></td>
    <td width="33%" valign="top"><h3>Handy Tips</h3>
      <p>If you operate any store online you should read the documentation provided to you by the online payment gateway you choose for handling the checkout process. You can get much more insight than I can offer on the various details of a gateway, from the gateway providers themselves. They are there to help you with whatever you need since they get a cut of your online business dealings.</p></td>
  </tr>
</table>

  </div>
  <?php include_once("template_footer.php");?>
</div>
</body>
</html>


Is This A Good Question/Topic? 0
  • +

Replies To: Webpage isn't available, connection to localhost was interrupted e

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3719
  • View blog
  • Posts: 5,991
  • Joined: 08-June 10

Re: Webpage isn't available, connection to localhost was interrupted e

Posted 24 November 2012 - 04:18 PM

Doubtful that this is a problem with your PHP code. If anything, a serious PHP error would cause a 500 error.

Try going though this article from Google's help site. If none of that helps, only then I'd start considering some kind of server issue.
Was This Post Helpful? 0
  • +
  • -

#3 creativecoding  Icon User is offline

  • Hash != Encryption
  • member icon


Reputation: 927
  • View blog
  • Posts: 3,208
  • Joined: 19-January 10

Re: Webpage isn't available, connection to localhost was interrupted e

Posted 24 November 2012 - 05:26 PM

Are you sure you're running server software and that it's setup correctly?
Was This Post Helpful? 0
  • +
  • -

#4 Hqtitan  Icon User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 51
  • Joined: 28-August 10

Re: Webpage isn't available, connection to localhost was interrupted e

Posted 24 November 2012 - 06:47 PM

It might help to check your PHP error log. I occasionally have an error in my code that causes a fatal PHP error and shows up in the web browser as "Webpage isn't available."
Was This Post Helpful? 1
  • +
  • -

#5 izic  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 197
  • Joined: 15-January 09

Re: Webpage isn't available, connection to localhost was interrupted e

Posted 26 November 2012 - 03:45 PM

@creativecoding - I'm using wampserver and everything seems correct.

@Hqtitan - How do I check my php error log? I'm using dreamweaver to make the website.
Was This Post Helpful? 0
  • +
  • -

#6 creativecoding  Icon User is offline

  • Hash != Encryption
  • member icon


Reputation: 927
  • View blog
  • Posts: 3,208
  • Joined: 19-January 10

Re: Webpage isn't available, connection to localhost was interrupted e

Posted 26 November 2012 - 04:17 PM

You can view your logs here: C:\wamp\logs


You should also try to access the command line version of your database - just to make sure it's working. Click on the wampserver icon, MySQL, MySQL Console. From there you can login and ensure your MySQL server is setup correctly.
Was This Post Helpful? 0
  • +
  • -

#7 izic  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 197
  • Joined: 15-January 09

Re: Webpage isn't available, connection to localhost was interrupted e

Posted 26 November 2012 - 04:42 PM

Found the error log but I'm not sure what I should be looking for
Was This Post Helpful? 0
  • +
  • -

#8 creativecoding  Icon User is offline

  • Hash != Encryption
  • member icon


Reputation: 927
  • View blog
  • Posts: 3,208
  • Joined: 19-January 10

Re: Webpage isn't available, connection to localhost was interrupted e

Posted 26 November 2012 - 08:45 PM

The most recent error after trying to access your script. They should have timestamps on them.
Was This Post Helpful? 0
  • +
  • -

#9 izic  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 197
  • Joined: 15-January 09

Re: Webpage isn't available, connection to localhost was interrupted e

Posted 26 November 2012 - 09:42 PM

View Postcreativecoding, on 26 November 2012 - 10:45 PM, said:

The most recent error after trying to access your script. They should have timestamps on them.


Most recent errors:

[Mon Nov 26 23:35:59 2012] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/favicon.ico
[Mon Nov 26 23:36:03 2012] [error] [client 127.0.0.1] PHP Notice: Undefined variable: product_list in C:\\wamp\\www\\Angie_Store\\storeadmin\\inventory_edit.php on line 88, referer: http://localhost/Ang...entory_list.php
[Mon Nov 26 23:36:03 2012] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/favicon.ico
[Mon Nov 26 23:36:13 2012] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/favicon.ico
[Mon Nov 26 23:36:43 2012] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/favicon.ico
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1