Author Topic: Site error?  (Read 1299 times)

0 Members and 1 Guest are viewing this topic.

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
Site error?
« on: February 15, 2017, 06:02:12 PM »

What is wrong with my site?


http://www.beamsvillewx.ca/
Ann-Marie
Beamsville, Ontario, Canada

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Site error?
« Reply #1 on: February 15, 2017, 06:05:14 PM »
The HTML just ends in the middle, two possible causes:
- the file got corrupted while being transferred to your server and is incomplete
- there is a PHP fatal error which stops execution of that script

I would try re-uploading that file to your server or post the actual code of that page here and I can see which line follows the text where it ends.

Currently your page ends like this:

Code: [Select]
<h3>Current Weather Conditions in Beamsville, Ontario</h3>

<p class="advisoryBox">No watches or warnings in effect for Lincoln, ON.</p>
<div class="column-dark">
<div align="center">
<p>Sorry. Incomplete file received from Environment Canada website.</p>
3

Which is definitely not how it should end even if the data from EC was incomplete. There are unclosed tags and no page end

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
Re: Site error?
« Reply #2 on: February 15, 2017, 06:28:32 PM »
KK, I've had this problem before. I know ec-radar.php is displaying the error, so I think I may have to take it out of the home page for now.  I also noticed my ec-forecast is behind, possible server problems, perhaps? I use 1&1.
Ann-Marie
Beamsville, Ontario, Canada

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9282
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Site error?
« Reply #3 on: February 15, 2017, 06:30:03 PM »
I sent an email Ann-Marie..

What I suggested was to change ec-radar.php from
Code: [Select]
  if(strlen($site) < 100) {
      print "<p>Sorry. Incomplete file received from Environment Canada website.</p>\n";
      exit;
  }
Try changing that to
Code: [Select]
  if(strlen($site) < 100) {
      print "<p>Sorry. Incomplete file received from Environment Canada website.</p>\n";
      print $Status;
      return;
  }
then we can see the status lines to help debug the issue.
« Last Edit: February 15, 2017, 06:32:31 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
Re: Site error?
« Reply #4 on: February 15, 2017, 06:39:30 PM »
Thanks Ken: I've made the changes.
Ann-Marie
Beamsville, Ontario, Canada

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9282
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Site error?
« Reply #5 on: February 15, 2017, 06:53:45 PM »
I ran your homepage with ?cache=no to force a cache refresh for the radar and in the view-source of your homepage, it shows
Quote
      <p>Sorry. Incomplete file received from Environment Canada website.</p>
<!-- ec-radar.php - V2.01 - 30-Nov-2015 -->
<!-- cacheDir='/homepages/22/d364066440/htdocs/radar/' -->
<!-- imageDir='./radar/' -->
<!-- date default timezone='America/Toronto' -->
<!-- siteID='ONT' -->
<!-- changed '/homepages/22/d364066440/htdocs/radar/ec-radar-en-ONT.txt'
         to: '/homepages/22/d364066440/htdocs/radar/ec-radar-en-ONT.txt' -->
<!-- now='2017-02-15 23:50:23 UTC' page cached='2017-02-15 23:47:32 UTC' (171 seconds ago) -->
<!-- forceRefresh=true -->
<!-- loading ec-radar-en-ONT.txt from
  'http://weather.gc.ca/radar/index_e.html?id=ONT' -->
<!-- Network error: Connection timed out (110) --><!-- unable to open ec-radar-en-ONT.txt for writing 0 bytes.. cache not saved -->
<!-- file: '/homepages/22/d364066440/htdocs/radar/ec-radar-en-ONT.txt' -->
so there's a transient connection issue between your webserver and weather.gc.ca server.   Hopefully, it will clear by itself.. if not, contact 1and1 tech support for assistance in resolving the connection issue.

You can also try changing the timeout in ec-radar.php
Code: [Select]
   $numberOfSeconds=4;   
to
Code: [Select]
   $numberOfSeconds=8;   
but that can also increase your page load time (when the cache refreshes) by an additional 4 seconds.
« Last Edit: February 15, 2017, 06:55:43 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
Re: Site error?
« Reply #6 on: February 15, 2017, 07:44:32 PM »
Thanks Ken: The connection issue is probably causing my ec-forecast problem as well. I'll just sit tight and see what happens for now.
Ann-Marie
Beamsville, Ontario, Canada

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
Re: Site error?
« Reply #7 on: March 04, 2017, 09:54:44 AM »

So the EC Radar and EC Forecast have not updated on my site for the past few days. Here is the latest view-source from my home page:


Quote
<p>Sorry. Incomplete file received from Environment Canada website.</p>
<!-- ec-radar.php - V2.02 - 22-Feb-2017 -->
<!-- cacheDir='/homepages/22/d364066440/htdocs/radar/' -->
<!-- imageDir='./radar/' -->
<!-- date default timezone='America/Toronto' -->
<!-- siteID='ONT' -->
<!-- changed '/homepages/22/d364066440/htdocs/radar/ec-radar-en-ONT.txt'
         to: '/homepages/22/d364066440/htdocs/radar/ec-radar-en-ONT.txt' -->
<!-- now='2017-03-04 14:45:58 UTC' page cached='2017-03-04 14:45:52 UTC' (6 seconds ago) -->
<!-- forceRefresh=true -->
<!-- loading ec-radar-en-ONT.txt from
  'https://weather.gc.ca/radar/index_e.html?id=ONT' -->
<!-- curl fetching 'https://weather.gc.ca/radar/index_e.html?id=ONT' -->
<!-- curl Error: Operation timed out after 0 milliseconds with 0 out of 0 bytes received -->
<!-- HTTP stats:  RC=0 dest=205.189.10.44 port=443 (from sce=74.208.180.71)
      Times: dns=0.000 conn=0.065 pxfer=0.000 get=5.205 total=5.205 secs -->
<!-- headers returned:
 -->
<!-- unable to open ec-radar-en-ONT.txt for writing 0 bytes.. cache not saved -->
<!-- file: '/homepages/22/d364066440/htdocs/radar/ec-radar-en-ONT.txt' -->
Ann-Marie
Beamsville, Ontario, Canada

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9282
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Site error?
« Reply #8 on: March 04, 2017, 10:07:23 AM »
It looks like
Quote
<!-- curl Error: Operation timed out after 0 milliseconds with 0 out of 0 bytes received -->
<!-- HTTP stats:  RC=0 dest=205.189.10.44 port=443 (from sce=74.208.180.71)
      Times: dns=0.000 conn=0.065 pxfer=0.000 get=5.205 total=5.205 secs -->
the weather.gc.ca site is accepting a connection for the request, and just not returning the data, so curl times out after 5 seconds.  It could be a routing issue between your webserver and weather.gc.ca server(s).  Unfortunately, that's not something you/we can fix.. it's a hoster issue.

When I try it, the query results in
Code: [Select]
<!-- curl fetching 'https://weather.gc.ca/radar/index_e.html?id=WKR' -->
<!-- HTTP stats:  RC=200 dest=205.189.10.44 port=443 (from sce=192.168.1.104)
      Times: dns=0.016 conn=0.109 pxfer=0.313 get=0.296 total=0.609 secs -->
for a total of < 1sec which is fairly 'normal' for the request to EC.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
Re: Site error?
« Reply #9 on: March 04, 2017, 10:19:01 AM »
Thanks Ken. I'll just have to be patient or change web hosts  :?
Ann-Marie
Beamsville, Ontario, Canada

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Site error?
« Reply #10 on: March 04, 2017, 11:01:56 AM »
Hi Ann-Marie,
Just to mention again that my wxradar and other EC pages seem to be working fine www.komokaweather.ca
You have likely seen that CAVUU in Kincardine also has issues and using 1and1.  Those may be totally different issues but has the common 1and1.  From an email exchange he posted looks like 1and1 is willing to work on it though.  Hopefully they do get it fixed for you, and soon!

Regards,
Paul

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
Re: Site error?
« Reply #11 on: March 04, 2017, 11:03:20 AM »
Thanks Paul.  I may give 1&1 a call.
Ann-Marie
Beamsville, Ontario, Canada