Author Topic: Radar-Status.php issue  (Read 243 times)

0 Members and 2 Guests are viewing this topic.

Offline mkutche

  • Forecaster
  • *****
  • Posts: 729
    • GosportWx.com
Radar-Status.php issue
« on: December 02, 2017, 10:35:33 AM »
I'm kinda puzzled on what this means

Notice: Undefined offset: 1 in /home/hj2ke8lfpx43/public_html/radar-status.php on line 158

Notice: Undefined offset: 1 in /home/hj2ke8lfpx43/public_html/radar-status.php on line 164

   Line 158  list($hdr1,$content1) = explode("\r\n\r\n",$html);
        Line 164  list($hdr2,$content2) = explode("\r\n\r\n",$html2);

Not sure which undefined offset is the problem here.

Mike
Mike K.
WS2080 - Cumulus MX v3.0.0
Gosport, Indiana
Gosportwx.com Gosportwx.com/PWS/ Gosportwx.com/j-template/ twitter.com/GosportINWX facebook.com/GosportWxcom
-----------------------------------------------------------

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6287
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Radar-Status.php issue
« Reply #1 on: December 02, 2017, 11:11:00 AM »
When asking that question, it's best to do a view-source on the page exhibiting the problem.  Helpful debugging info is usually there in HTML comments.

Since you don't cite the page where the errors happened, I can only guess that the requests to the two NWS pages for radar had failed with no HTML content received.  That's why the $content1 and $content2 entries were not set giving the Notice error.

Can't tell unless I can see the page while the error is happening...
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline mkutche

  • Forecaster
  • *****
  • Posts: 729
    • GosportWx.com
Re: Radar-Status.php issue
« Reply #2 on: December 02, 2017, 11:13:37 AM »
When asking that question, it's best to do a view-source on the page exhibiting the problem.  Helpful debugging info is usually there in HTML comments.

Since you don't cite the page where the errors happened, I can only guess that the requests to the two NWS pages for radar had failed with no HTML content received.  That's why the $content1 and $content2 entries were not set giving the Notice error.

Can't tell unless I can see the page while the error is happening...

sorry http://www.gosportwx.com/wxstatus.php i noticed wherever i put the radar-status.php it does it on those pages too.
Mike K.
WS2080 - Cumulus MX v3.0.0
Gosport, Indiana
Gosportwx.com Gosportwx.com/PWS/ Gosportwx.com/j-template/ twitter.com/GosportINWX facebook.com/GosportWxcom
-----------------------------------------------------------

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6287
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Radar-Status.php issue
« Reply #3 on: December 02, 2017, 11:21:45 AM »
Ok, doing view-source:http://www.gosportwx.com/wxstatus.php?cache to force a cache refresh for radar status
shows
Quote
<!-- radar-status.php V1.15 - 22-Feb-2017 -->
<!-- loading ./cache/radar-status.txt from http://radar3pub.ncep.noaa.gov/rcvxmit.sites.public.html -->
<!-- curl fetching 'http://radar3pub.ncep.noaa.gov/rcvxmit.sites.public.html' -->
<!-- HTTP stats:  RC=200 dest=140.172.138.16 port=80 (from sce=72.167.190.6)
      Times: dns=0.000 conn=0.044 pxfer=0.044 get=0.090 total=0.134 secs -->
<!-- appending ./cache/radar-status.txt from http://radar3pub.ncep.noaa.gov/ftm.txt -->
<!-- curl fetching 'http://radar3pub.ncep.noaa.gov/ftm.txt' -->
<!-- HTTP stats:  RC=200 dest=140.172.138.16 port=80 (from sce=72.167.190.6)
      Times: dns=0.000 conn=0.063 pxfer=0.063 get=0.070 total=0.133 secs -->
<!-- cache written to ./cache/radar-status.txt. -->
<!-- 203 records found -->
<!--
UTCdate    =1512231482 (2017-12-02 04:18:02)
lastUTCdate=1512231137 (2017-12-02 04:12:17)
 -->
which is normal.  If you get the Notice: errata, then likely the curl fetch failed and the reason would be shown in the curl status return messages.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline mkutche

  • Forecaster
  • *****
  • Posts: 729
    • GosportWx.com
Re: Radar-Status.php issue
« Reply #4 on: December 02, 2017, 11:27:22 AM »
Ok, doing view-source:http://www.gosportwx.com/wxstatus.php?cache to force a cache refresh for radar status
shows
Quote
<!-- radar-status.php V1.15 - 22-Feb-2017 -->
<!-- loading ./cache/radar-status.txt from http://radar3pub.ncep.noaa.gov/rcvxmit.sites.public.html -->
<!-- curl fetching 'http://radar3pub.ncep.noaa.gov/rcvxmit.sites.public.html' -->
<!-- HTTP stats:  RC=200 dest=140.172.138.16 port=80 (from sce=72.167.190.6)
      Times: dns=0.000 conn=0.044 pxfer=0.044 get=0.090 total=0.134 secs -->
<!-- appending ./cache/radar-status.txt from http://radar3pub.ncep.noaa.gov/ftm.txt -->
<!-- curl fetching 'http://radar3pub.ncep.noaa.gov/ftm.txt' -->
<!-- HTTP stats:  RC=200 dest=140.172.138.16 port=80 (from sce=72.167.190.6)
      Times: dns=0.000 conn=0.063 pxfer=0.063 get=0.070 total=0.133 secs -->
<!-- cache written to ./cache/radar-status.txt. -->
<!-- 203 records found -->
<!--
UTCdate    =1512231482 (2017-12-02 04:18:02)
lastUTCdate=1512231137 (2017-12-02 04:12:17)
 -->
which is normal.  If you get the Notice: errata, then likely the curl fetch failed and the reason would be shown in the curl status return messages.

ok thanks i'll save the cache url if it does it again.
Mike K.
WS2080 - Cumulus MX v3.0.0
Gosport, Indiana
Gosportwx.com Gosportwx.com/PWS/ Gosportwx.com/j-template/ twitter.com/GosportINWX facebook.com/GosportWxcom
-----------------------------------------------------------

 

anything