Author Topic: WU-history issue  (Read 696 times)

0 Members and 1 Guest are viewing this topic.

Offline mkutche

  • Forecaster
  • *****
  • Posts: 792
    • GosportWx.com
WU-history issue
« on: December 01, 2017, 10:01:11 PM »
Ok sorry to keep asking for help but I promise this is the last thing that I need help with. http://gosportwx.com/wxwu-history.php fails to completely load, I never changed any settings that I had prior to my transfer back to Godaddy.

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: 6765
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-history issue
« Reply #1 on: December 01, 2017, 10:15:02 PM »
Update WU-history-inc.php to V3.4  November 7, 2016
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: 792
    • GosportWx.com
Re: WU-history issue
« Reply #2 on: December 01, 2017, 10:22:34 PM »
Update WU-history-inc.php to V3.4  November 7, 2016

Thanks I thought I updated everything lol..
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 mkutche

  • Forecaster
  • *****
  • Posts: 792
    • GosportWx.com
Re: WU-history issue
« Reply #3 on: December 01, 2017, 10:25:51 PM »
Update WU-history-inc.php to V3.4  November 7, 2016

Thanks I thought I updated everything lol..
Mike

now i'm getting this weirdness..

Quote
Notice: Undefined variable: useFopen in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 1410

Notice: Uninitialized string offset: 0 in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 1398

Notice: Uninitialized string offset: 0 in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 1398

Notice: Uninitialized string offset: 0 in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 1398

Notice: Uninitialized string offset: 0 in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 1398

Notice: Undefined offset: 0 in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 292


These string offsets are gonna be the death of me lol
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: 6765
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-history issue
« Reply #4 on: December 01, 2017, 10:32:15 PM »
You could also change your PHP php.ini to suppress Notice errata

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

would make it just like PHP 5.3

Chasing down trivial things like Notice errata can be very tiring, and older scripts may have a bunch of them (as you've found).
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: 792
    • GosportWx.com
Re: WU-history issue
« Reply #5 on: December 01, 2017, 10:33:13 PM »
You could also change your PHP php.ini to suppress Notice errata

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

would make it just like PHP 5.3

Chasing down trivial things like Notice errata can be very tiring, and older scripts may have a bunch of them (as you've found).

ok where is php.ini?
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: 6765
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-history issue
« Reply #6 on: December 01, 2017, 10:37:31 PM »
You can just create a text file named 'php.ini' and put it in your document root.

Put

allow_url_fopen = on
allow_url_include = off
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

in it and upload.

Also.. I found I'd fixed a couple more errata with this version (attached)
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: 792
    • GosportWx.com
Re: WU-history issue
« Reply #7 on: December 01, 2017, 10:42:33 PM »
You can just create a text file named 'php.ini' and put it in your document root.

Put

allow_url_fopen = on
allow_url_include = off
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

in it and upload.

Also.. I found I'd fixed a couple more errata with this version (attached)

not seeing document root on my godaddy server
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: 6765
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-history issue
« Reply #8 on: December 01, 2017, 10:45:52 PM »
The 'document root' is the place in the filesystem where your .php/.html pages are stored.  Same place as the index.php for your main website.
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: 792
    • GosportWx.com
Re: WU-history issue
« Reply #9 on: December 01, 2017, 10:46:26 PM »
The 'document root' is the place in the filesystem where your .php/.html pages are stored.  Same place as the index.php for your main website.

no i looked in /public_html and /www
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: 6765
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-history issue
« Reply #10 on: December 01, 2017, 10:50:29 PM »
if there's not a 'php.ini' file in your public_html directory, then just create one with the above contents.

NB: 'document root' is the generic name for the home directory of your website.  On some servers, it's in public_html/, on others it's in www/ on still others, it's httpdocs/

'Document root' is just shorthand for the purpose of the directory -- which *precise* file directory it is depends on your webhosting setup.
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: 792
    • GosportWx.com
Re: WU-history issue
« Reply #11 on: December 01, 2017, 10:51:44 PM »
if there's not a 'php.ini' file in your public_html directory, then just create one with the above contents.

NB: 'document root' is the generic name for the home directory of your website.  On some servers, it's in public_html/, on others it's in www/ on still others, it's httpdocs/

'Document root' is just shorthand for the purpose of the directory -- which *precise* file directory it is depends on your webhosting setup.

ok I did that and i still get the errors
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: 6765
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-history issue
« Reply #12 on: December 01, 2017, 11:03:54 PM »
Now the issue is you aren't getting WU data for your station.. it's been happening a lot lately.  Wait for the data to reappear.

A view-source:http://gosportwx.com/wxwu-history.php shows
Quote
!-- WU-History-inc.php - Version 3.4a - 21-Feb-2017  -->
<!-- final units='E' -->
<!-- curl fetching 'https://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KINGOSPO1&month=12&day=01&year=2017&format=1&graphspan=day' -->
<!-- HTTP stats:  RC=200 dest=38.68.169.72 port=443 (from sce=72.167.190.6)
      Times: dns=0.001 conn=0.011 pxfer=0.044 get=0.171 total=0.216 secs -->
<!-- headers:
HTTP/1.1 200 OK
Server: Apache/2.2.15 (CentOS)
Pragma: no-cache
Access-Control-Allow-Origin: http://www.wunderground.com
Access-Control-Allow-Credentials: true
X-CreationTime: 0.118
Content-Type: text/html; charset=UTF-8
Cache-Control: private, no-cache, must-revalidate
Expires: Sat, 02 Dec 2017 03:52:43 GMT
Date: Sat, 02 Dec 2017 03:52:43 GMT
Content-Length: 184
Connection: keep-alive
Set-Cookie: DT=1512186763:11531:ip-10-226-237-178; path=/; expires=Fri, 01-Jan-2020 00:00:00 GMT; domain=.wunderground.com
Set-Cookie: Prefs=FAVS:1|WXSN:1|PWSOBS:1|WPHO:1|PHOT:1|RADC:0|RADALL:0|HIST0:NULL|GIFT:1|PHOTOTHUMBS:50|; path=/; expires=Fri, 01-Jan-2020 00:00:00 GMT; domain=.wunderground.com
Property-id: drupal-prod
X-RequestSource: AkamaiProdProxy
WU-Device-Class: desktop
WU-Locale-Group: GLS+
WU-Connection-Speed: 4G
X-RequestSource: AkamaiDefaultDNA
 -->
<!-- Size of the array is 1 -->
<!-- Size of the final array is 1 -->

The last field should show someting like
Quote
<!-- Size of the array is 210 -->
<!-- Size of the final array is 210 -->
like it does on my page now.

WU has been unreliable for PWS data retrieval for several months now...
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: 792
    • GosportWx.com
Re: WU-history issue
« Reply #13 on: December 01, 2017, 11:06:22 PM »
Now the issue is you aren't getting WU data for your station.. it's been happening a lot lately.  Wait for the data to reappear.

A view-source:http://gosportwx.com/wxwu-history.php shows
Quote
!-- WU-History-inc.php - Version 3.4a - 21-Feb-2017  -->
<!-- final units='E' -->
<!-- curl fetching 'https://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KINGOSPO1&month=12&day=01&year=2017&format=1&graphspan=day' -->
<!-- HTTP stats:  RC=200 dest=38.68.169.72 port=443 (from sce=72.167.190.6)
      Times: dns=0.001 conn=0.011 pxfer=0.044 get=0.171 total=0.216 secs -->
<!-- headers:
HTTP/1.1 200 OK
Server: Apache/2.2.15 (CentOS)
Pragma: no-cache
Access-Control-Allow-Origin: http://www.wunderground.com
Access-Control-Allow-Credentials: true
X-CreationTime: 0.118
Content-Type: text/html; charset=UTF-8
Cache-Control: private, no-cache, must-revalidate
Expires: Sat, 02 Dec 2017 03:52:43 GMT
Date: Sat, 02 Dec 2017 03:52:43 GMT
Content-Length: 184
Connection: keep-alive
Set-Cookie: DT=1512186763:11531:ip-10-226-237-178; path=/; expires=Fri, 01-Jan-2020 00:00:00 GMT; domain=.wunderground.com
Set-Cookie: Prefs=FAVS:1|WXSN:1|PWSOBS:1|WPHO:1|PHOT:1|RADC:0|RADALL:0|HIST0:NULL|GIFT:1|PHOTOTHUMBS:50|; path=/; expires=Fri, 01-Jan-2020 00:00:00 GMT; domain=.wunderground.com
Property-id: drupal-prod
X-RequestSource: AkamaiProdProxy
WU-Device-Class: desktop
WU-Locale-Group: GLS+
WU-Connection-Speed: 4G
X-RequestSource: AkamaiDefaultDNA
 -->
<!-- Size of the array is 1 -->
<!-- Size of the final array is 1 -->

The last field should show someting like
Quote
<!-- Size of the array is 210 -->
<!-- Size of the final array is 210 -->
like it does on my page now.

WU has been unreliable for PWS data retrieval for several months now...

changed it from KINGOSPO1 to KINGOSP2 and only errors i get now are

Quote
Notice: Use of undefined constant mon - assumed 'mon' in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 373

Notice: Use of undefined constant mday - assumed 'mday' in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 373

Notice: Use of undefined constant year - assumed 'year' in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 373

Notice: Use of undefined constant mon - assumed 'mon' in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 461

Notice: Use of undefined constant mday - assumed 'mday' in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 461

Notice: Use of undefined constant year - assumed 'year' in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 461

Notice: Undefined index: PHPSELF in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 387
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 mkutche

  • Forecaster
  • *****
  • Posts: 792
    • GosportWx.com
Re: WU-history issue
« Reply #14 on: December 01, 2017, 11:15:40 PM »
for lines 373 and 461 i just had to add quotes ["mon"] ["mday"] ["year"] for the last error its a bit challenging
« Last Edit: December 01, 2017, 11:19:01 PM by mkutche »
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: 6765
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-history issue
« Reply #15 on: December 01, 2017, 11:17:29 PM »
Yep.. and replace $PHP_SELF with $_SERVER['PHP_SELF']

I've done all that in 3.4b
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: 792
    • GosportWx.com
Re: WU-history issue
« Reply #16 on: December 01, 2017, 11:19:56 PM »
Yep.. and replace $PHP_SELF with $_SERVER['PHP_SELF']

I've done all that in 3.4b

was so close on fixing that one thanks man :) I learned alot from you, although sometimes it's a pain when i get stumped! Thanks for your help tonight! Have a great night :)

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
-----------------------------------------------------------

 

anything