Author Topic: Radomir's wxwugraphs with WXDailyHistory working! (almost)  (Read 2830 times)

0 Members and 1 Guest are viewing this topic.

Offline rlee171

  • Contributor
  • ***
  • Posts: 124
Radomir's wxwugraphs with WXDailyHistory working! (almost)
« on: June 17, 2019, 10:00:18 PM »
UPDATE!!  Problem mostly solved.  :lol:  Chrome's developers tools led me to it. A simple change in the WUG-settings.php script. $jQueryFile = 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js';  The original was http, changed it to https and all is well. The monthly and yearly are not displaying correctly, but I am pleased to at least have the daily for now. If anyone with more expertise than me wants to look at that, it would be much appreciated.

I have finally been able to populate Radomir's graphs using Highcharts and the new WXDailyHistory. Of course anything I bring to the board has an elementary problem that flies right over my head. To the point, I was able to get the data to display only using IE11. I know none of us use it but I was throwing the proverbial mud on the wall in desperation. To my astonishment it is the only browser that will show any results. However, it will only display after clicking on the "show all content" on the security warning tab at the bottom of the browser. After that, I did a ?debug=y and received " Warning: Cannot modify header information - headers already sent by (output started at /home/ln0pka3d6few/public_html/common.php:352) in /home/ln0pka3d6few/public_html/top.php on line 43". I have studied both the common.php and top.php and cannot find anything wrong. Also I do not get that error on any other page. The good new is that Ken's fix for this antique script works, the bad news is I can't find what is causing the error.
hsnpar.com/wxwugraphs.php
 [ You are not allowed to view attachments ]
« Last Edit: June 17, 2019, 11:25:44 PM by rlee171 »
Davis VP2 
Blitzortung Stations: 1387  1445  2315
Cumulus
GRLevel3

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Radomir's wxwugraphs with WXDailyHistory working! (almost)
« Reply #1 on: June 18, 2019, 12:06:40 AM »
Adding ?debug=y to any wx...php page will likely produce the "Warning: Cannot modify header information - headers already sent by (output started at /home/ln0pka3d6few/public_html/common.php:352) in /home/ln0pka3d6few/public_html/top.php on line 43" error display since the header() is actually produced in include-style-switcher.php setting up the page default language.

It's not harmful per se, and just the way it works with ?debug=y -- a lot of HTML comments appear from various scripts execution in the view-source of the page that can help in debugging.  ?debug=y is only for debugging.. not for production use.

Glad you found the http/https change for jQuery file .. that on an https page, it the browser will refuse to load scripts that are http accessed.
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 rlee171

  • Contributor
  • ***
  • Posts: 124
Re: Radomir's wxwugraphs with WXDailyHistory working! (almost)
« Reply #2 on: June 18, 2019, 12:40:21 PM »
Thanks for the explanation on why the error code was not even related to the actual issue. I had noticed debug being used in previous post and was trying to put in some effort on trying to find the problem without just jumping on the forum with a question. Over the years there have been comments by a few of the more experienced users about people being too "lazy" not attempting some time on their own and just abusing the forum. My "career" was 40 years of construction. I had never even seen any scripts or programming until I landed here. Just downloading and setting up my page took over a week and couple of all nighters. Thank you for your graceful way of pointing out what is obvious to most.

Sincerely,

Ralph
Davis VP2 
Blitzortung Stations: 1387  1445  2315
Cumulus
GRLevel3

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Radomir's wxwugraphs with WXDailyHistory working! (almost)
« Reply #3 on: June 18, 2019, 12:49:24 PM »
I did suggest preloading all the monthly cache files by running WXDailyHistory.php on your site with &debug=y on the URL so you could see the HTML comments at the bottom of the page showing the status for each fetch/cache load while you walk through the years back to 2008 (or to the year you started submitting data to WU), whichever is greater.

You're very welcome for the assistance, and congratulations for diving in and learning about the weather website hobby -- it's kept me entertained for many years, and I'm pleased that others find my scripting useful for their hobby too.

Best regards,
Ken
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 NoodweerBenelux

  • Member
  • *
  • Posts: 1
Re: Radomir's wxwugraphs with WXDailyHistory working! (almost)
« Reply #4 on: June 23, 2019, 07:29:39 AM »
I still have this problem on my website (no monthly or yearly graphs). I just fixed the https issue, but has someone an decent solution?

http://weerstationwaregem.be/grafieken