Author Topic: Error in Ajax-dashboard6.php  (Read 513 times)

0 Members and 1 Guest are viewing this topic.

Offline nineback

  • Contributor
  • ***
  • Posts: 136
    • Albertville, AL Weather
Error in Ajax-dashboard6.php
« on: October 05, 2021, 09:52:41 AM »
I have suddenly started getting this error:

Notice: Undefined offset: 0 in /weewxwdalt/ajax-dashboard6.php on line 1946

Line 1946 is: <?php $VPuv2 = round($UVfcstUVI[$UVptr - $evening], 0);

I get the same error for several other lines containing: $VPuv2 = round($UVfcstUVI[$UVptr - $evening], 0);

I have not made any recent changes to the script.

www.kq5s.com
Davis VP+
Weather Display/WeeWX
http://www.kq5s.com/

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Error in Ajax-dashboard6.php
« Reply #1 on: October 05, 2021, 11:49:01 AM »
The issue seems to be coming from get-UV-forecast-inc.php which has the following results:
Quote
<!-- get-UV-forecast-inc.php V1.09 - 12-Feb-2021 -->
<!-- UV forecast courtesy of and Copyright &copy; KNMI/ESA (http://www.temis.nl/). Used with permission. -->
<!-- curl fetching 'https://www.temis.nl/uvradiation/nrt/uvindex.php?lon=-122.0227&lat=37.2715' -->
<!-- curl Error: SSL: no alternative certificate subject name matches target host name 'www.temis.nl' -->
<!-- HTTP stats:  RC=0 dest=52.213.179.56 port=443 (from sce=198.46.81.47)
      Times: dns=0.001 conn=4.591 pxfer=0.000 get=4.791 total=4.791 secs -->
<!-- headers returned:

 -->
<!-- UV data load from from URL https://www.temis.nl/uvradiation/nrt/uvindex.php?lon=-122.0227&lat=37.2715 -->
<!-- data not available -->
That script fills in the $UVfcstUVI array, and since your website server can't connect to www.temis.nl using HTTPS, the array has no entries (thus the Notice: errata).  You are running the current script version.  The script is working fine on my (and other sites), so I suspect something amiss in the server configuration of your website server (no something you can normally change).

Running check-fetch-times.php?show=info on your site shows:
Quote
Current required cURL features status:

cURL version: 7.77.0
cURL SSL version: OpenSSL/1.1.1l
cURL libz version: 1.2.7
SSL is available
LIBZ is available
cURL protocols supported: dict, file, ftp, ftps, gopher, gophers, http, https, imap, imaps, mqtt, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp

For reference, my site shows
Quote
Current required cURL features status:

cURL version: 7.29.0
cURL SSL version: NSS/3.53.1
cURL libz version: 1.2.7
SSL is available
LIBZ is available
cURL protocols supported: dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp
but I'm running CentOS7, not Ubuntu on my server.

Running check-fetch-times.php on your site shows the same error, but does show success for https://alerts.weather.gov/cap/wwaatmget.php?x=ALZ008 so https is working to external sites.

I think you should call tech support for your hoster, and ask them to flush the SSL certificate cache for www.temis.nl .. maybe that will resolve this issue.
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 nineback

  • Contributor
  • ***
  • Posts: 136
    • Albertville, AL Weather
Re: Error in Ajax-dashboard6.php
« Reply #2 on: October 06, 2021, 08:23:56 PM »
Thanks Ken.

Tom
Davis VP+
Weather Display/WeeWX
http://www.kq5s.com/

 

anything