Author Topic: BOmaps  (Read 2729 times)

0 Members and 1 Guest are viewing this topic.

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
BOmaps
« on: May 02, 2020, 05:21:06 PM »

Hi Ken,
At the time of my GoDaddy hack attempt last week which GoDaddy handled well, they talked me into updating my PHP version from 5.4.6 to 7.4.  Seemed like a good idea but expected some issues to popup.  One such issue resulted in a somewhat nasty email from GoDaddy.
"Dear Paul,
Your komokaweather.com website hosting account has been storing or archiving files in a manner for which it is not intended or compatible.
While we ask that you fully review your current and intended usage, the following was seen to be of primary concern at this time:
/public_html/BOmaps
We understand that this situation may have been unintentional. However, whether or not the content is linked or otherwise in use, using a website hosting plan to store large files or collections of files causes and contributes to various issues which negatively impact our service and, in turn, its performance and availability to other customers.
While server plans and file hosting services are designed to host large individual files and/or large collections of files, your website hosting plan is designed and optimized to serve website pages as quickly and efficiently as possible.
*NOTE: In order to mitigate the negative impact of this issue on our network, it became necessary for our hosting administrators to take the following action on your hosting space:
Removed /public_html/BOmaps/error_log - 788G
In addition to removing/moving any additional content being used in this way to a more suitable platform, it is required that you make whatever changes may be necessary to prevent further recurrence of this issue."


As there is a regularly scheduled cron job for BOmaps there is a new error.log that keeps on getting bigger. 
I presume the error is due to my change to PHP 7.4. 
Is there an updated version of BOmaps or suggestion on how I can change to avoid the errors?  I have attached contents of the current error_log zip.


I can see there are other directors with error logs so will need to start working on those as well.


Thanks for any help.
Paul






Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: BOmaps
« Reply #1 on: May 02, 2020, 11:56:56 PM »
Odd.. I see a lot of errata from GIFEncoder.class.php.

Try my copy (it's running on PHP 7.4.3 just fine).

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 PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: BOmaps
« Reply #2 on: May 03, 2020, 09:33:37 AM »

Thanks for looking Ken.


I uploaded your GIFEncoder.class.php and after the next scheduled GoDaddy cronjob it gave the same error.  Then used DiffMerge and your file and my original are identical.


At each 5 min crob job the same error lines:
"[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 78
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 79
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 107
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 108
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 123
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 128
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 129
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 132
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 134
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 139
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 142
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 143
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 144
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 140
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 152
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 162
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 168
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 171
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 172
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 177
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 180
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 181
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 209
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 209
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 210
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 210
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 211
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 211
[03-May-2020 13:15:01 UTC] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; GIFEncoder has a deprecated constructor in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 27"


Any suggestion of what I can ask GoDaddy on this?


Paul

Offline vreihen

  • El Niņo chaser
  • Forecaster
  • *****
  • Posts: 1216
  • K2BIG
WU Gold Stars for everyone! :lol:

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: BOmaps
« Reply #4 on: May 03, 2020, 10:42:35 AM »

Maybe I'll be a script developer yet  :lol:
I changed curlys { 10 } for square [ 10 ] in line 78 and line 78 no longer shows in the errors.  Likely should try that with all the 28 lines in the error log.


Thanks @vreihen
Paul

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: BOmaps
« Reply #5 on: May 03, 2020, 11:07:09 AM »

I made all the curly {} edits to square [] and all those errors are gone and page still displays http://www.komokaweather.com/BOmaps/indexON.php


The only error line is:
[03-May-2020 15:00:01 UTC] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; GIFEncoder has a deprecated constructor in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 27
again, beyond my understanding :oops: 


Hope GoDaddy is happy now!
Paul



 

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: BOmaps
« Reply #6 on: May 03, 2020, 11:24:22 AM »
I think I have now fixed both the  curly {} edits to square [] also, and the deprecated constructor message with
Code: [Select]
    function GIFEncoder (
to
Code: [Select]
    public function __construct (

Those edits are in the attached.  Odd that I'd not seen those messages in my error_log.  Thanks for spotting them.
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 PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: BOmaps
« Reply #7 on: May 03, 2020, 11:59:17 AM »

Again thanks Ken, and no more errors in BOmaps.


Now on to others...


Enjoy,
Paul

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: BOmaps
« Reply #8 on: May 03, 2020, 12:12:13 PM »
If you find others in my scripts, please let me know...
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 PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: BOmaps
« Reply #9 on: May 03, 2020, 12:43:43 PM »

Thanks Ken,
I still have 2 or 3 on the site but one is not yours - sagerCW and I am resolving that.


Not sure why check-fetch-time is showing up,
And ajax-dashboard I believe is current but has been slightly modified by me to include that sagerCW script in www.komokaweather.com/komokaweather-ca forecast dashboard.


ajax-dashboard.php lines 1197 to 1205 are:
1197 function moonphase ($WDmoonage) {
1198
1199  preg_match_all('|(\d+)|is',$WDmoonage,$matches);
1200 //  print "<!-- matches=\n" . print_r($matches,true) . "-->\n";
1201 print "<!-- WDmoonage='$WDmoonage', matches=\n" . print_r($matches,true) . "-->\n";
1202  $mdays = $matches[1][0];
1203  $mhours = $matches[1][1];
1204  $mmins = $matches[1][2];
1205 $mpct  = $matches[1][3];





Part of current error log:
[03-May-2020 11:49:17 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 11:49:17 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 11:49:17 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 11:49:17 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 11:49:17 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 11:49:17 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 11:49:18 America/Toronto] PHP Deprecated:  join(): Passing glue string after array is deprecated. Swap the parameters in /home/psoykkrhjuz3/public_html/weather/sagerCW.php on line 111
[03-May-2020 11:49:28 America/Toronto] PHP Deprecated:  join(): Passing glue string after array is deprecated. Swap the parameters in /home/psoykkrhjuz3/public_html/komokaweather-ca/check-fetch-times.php on line 1493
[03-May-2020 11:50:28 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 11:50:28 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 11:50:28 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 11:50:28 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 11:50:28 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 11:50:28 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 11:50:29 America/Toronto] PHP Deprecated:  join(): Passing glue string after array is deprecated. Swap the parameters in /home/psoykkrhjuz3/public_html/weather/sagerCW.php on line 111
[03-May-2020 11:55:22 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 11:55:23 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 11:55:23 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 11:55:23 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 11:55:23 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 11:55:23 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 11:55:24 America/Toronto] PHP Deprecated:  join(): Passing glue string after array is deprecated. Swap the parameters in /home/psoykkrhjuz3/public_html/weather/sagerCW.php on line 111
[03-May-2020 12:00:31 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 12:00:31 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 12:00:31 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 12:00:31 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 12:00:31 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 12:00:31 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 12:00:32 America/Toronto] PHP Deprecated:  join(): Passing glue string after array is deprecated. Swap the parameters in /home/psoykkrhjuz3/public_html/weather/sagerCW.php on line 111
[03-May-2020 12:04:56 America/Toronto] PHP Deprecated:  The each() function is deprecated. This message will be suppressed on further calls in /home/psoykkrhjuz3/public_html/komokaweather-ca/mesonet-map-genhtml-inc.php on line 208
[03-May-2020 12:05:28 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 12:05:28 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 12:05:28 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 12:05:28 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 12:05:28 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 12:05:28 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 12:05:28 America/Toronto] PHP Deprecated:  join(): Passing glue string after array is deprecated. Swap the parameters in /home/psoykkrhjuz3/public_html/weather/sagerCW.php on line 111
[03-May-2020 12:10:22 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 12:10:22 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 12:10:22 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 12:10:22 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 12:10:22 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 12:10:22 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 12:10:23 America/Toronto] PHP Deprecated:  join(): Passing glue string after array is deprecated. Swap the parameters in /home/psoykkrhjuz3/public_html/weather/sagerCW.php on line 111
[03-May-2020 12:15:30 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 12:15:30 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 12:15:30 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 12:15:30 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 12:15:30 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 12:15:30 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 12:15:30 America/Toronto] PHP Deprecated:  join(): Passing glue string after array is deprecated. Swap the parameters in /home/psoykkrhjuz3/public_html/weather/sagerCW.php on line 111
[03-May-2020 12:16:36 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 12:16:36 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 12:16:36 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 12:16:36 America/Toronto] PHP Notice:  Undefined offset: 1 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1203
[03-May-2020 12:16:36 America/Toronto] PHP Notice:  Undefined offset: 2 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1204
[03-May-2020 12:16:36 America/Toronto] PHP Notice:  Undefined offset: 3 in /home/psoykkrhjuz3/public_html/komokaweather-ca/ajax-dashboard.php on line 1205
[03-May-2020 12:16:36 America/Toronto] PHP Deprecated:  join(): Passing glue string after array is deprecated. Swap the parameters in /home/psoykkrhjuz3/public_html/komokaweather-ca/sagerCW.php on line 111








Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: BOmaps
« Reply #10 on: May 03, 2020, 03:45:21 PM »
You do have a few scripts to update http://www.komokaweather.com/komokaweather-ca/check-fetch-times.php?show=versions
It includes the fix for check-fetch-times.php error Passing glue string after array is deprecated.
The http://www.komokaweather.com/komokaweather-ca/mesonet-map-check-versions.php shows updates needed for the mesonet-map set of scripts also.

The ajax-dashboard.php errors seem to be coming from
Code: [Select]
function moonphase ($WDmoonage) {

  preg_match_all('|(\d+)|is',$WDmoonage,$matches);
//  print "<!-- matches=\n" . print_r($matches,true) . "-->\n";
print "<!-- WDmoonage='$WDmoonage', matches=\n" . print_r($matches,true) . "-->\n";
  $mdays = $matches[1][0];
  $mhours = $matches[1][1];
  $mmins = $matches[1][2];
  $mpct  = $matches[1][3];
for the mhours,mmins,mpct values not found in the input string.
That function is called in line 860 by
Code: [Select]
alt="<?php $t1 =  moonphase($moonage) . ", Moon at $moonagedays days in cycle";The $moonage value should be computed for your CU site by
Code: [Select]
} else { // perform non-WD moon stuff
$mooninfo = cGetMoonInfo();  /* Note:  getMoonInfo() is located in common.php */
/* returns $mooninfo of:
    [age] => 9 days, 11 hours, 57 minutes
    [ill] => 65
    [pic] => 8
    [phase] => Waxing Gibbous
    [NM] => 1294131882
    [NMGMT] => Tue, 04-Jan-2011 09:04 GMT
    [NMWD] => 09:04 GMT 04 January 2011
    [Q1] => 1294831983
    [Q1GMT] => Wed, 12-Jan-2011 11:33 GMT
    [Q1WD] => 11:33 GMT 12 January 2011
    [FM] => 1295472210
    [FMGMT] => Wed, 19-Jan-2011 21:23 GMT
    [FMWD] => 21:23 GMT 19 January 2011
    [Q3] => 1298590089
    [Q3GMT] => Thu, 24-Feb-2011 23:28 GMT
    [Q3WD] => 23:28 GMT 24 February 2011
    [Q4] => 1296700310
    [Q4GMT] => Thu, 03-Feb-2011 02:31 GMT
    [Q4WD] => 02:31 GMT 03 February 2011
    [FM2] => 1298018189
    [FM2GMT] => Fri, 18-Feb-2011 08:36 GMT
    [FM2WD] => 08:36 GMT 18 February 2011
*/
print "<!-- cGetMoonInfo returns\n".print_r($mooninfo,true)." -->\n";
if(!isset($moonphase)) {$moonphase = $mooninfo->ill.'%'; }
if(!isset($newmoon))   {$newmoon   = $mooninfo->NMWD;    }
if(!isset($nextnewmoon)) {$nextnewmoon = $mooninfo->Q4WD; } /*check this! */
if(!isset($firstquarter)) {$firstquarter = $mooninfo->Q1WD; }
if(!isset($lastquarter)) {$lastquarter = $mooninfo->Q3WD; }
if(!isset($fullmoon))    {$fullmoon = $mooninfo->FMWD; }
if(!isset($moonphasename)) {$moonphasename = $mooninfo->phase;}
if(!isset($moonagedays))  {$moonagedays = $mooninfo->pic; }
if(!isset($moonage))      {$moonage = 'Moon age: '.$mooninfo->age.','.$mooninfo->ill.'%'; }
so it should look like the expected Weather-Display format of
Code: [Select]
$moonage = "Moon age: 10 days,10 hours,41 minutes,80%"; and then the notice errata would not appear.
Running your index.php?debug=yes and a view-source of that reveals
Quote
<!-- WDmoonage='10', matches=
Array
(
   
  • => Array

        (
           
  • => 10

        )

    [1] => Array
        (
           
  • => 10

        )

)
-->
which is not in the expected format.  Do the updates to your site and see if it persists.

Hope this helps...

Best regards,
Ken
« Last Edit: May 03, 2020, 03:47:08 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 PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: BOmaps
« Reply #11 on: May 03, 2020, 06:22:38 PM »
Thanks again Ken,
I thought I was reasonably up to date so a bit embarrassed.  Actually found all the MESOMAPS files from 2018 sitting loose in my BaseCanada update folder so looks like I had started to update at that time but never finished it.  Now all Current.


The error in ajax-dashboard is still showing though.  I also had an error re ec-radar but likely a temporary lack of access to the EC site as the error is no longer there.  Attached is the error_log zip.


Much appreciated,
Paul

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: BOmaps
« Reply #12 on: May 03, 2020, 07:42:08 PM »
Hi Paul,
It looks like the ajax-dashboard line 301
Code: [Select]
if(!isset($moonage))      {$moonage = 'Moon age: '.$mooninfo->age.','.$mooninfo->ill.'%'; }
is NOT being executed, likely due to having $moonage defined from a different CU tag.  Since your CUtags.php has a
Code: [Select]
MoonAge|10:|:, I suspect that's a likely source.  The stock CU-defs.php has nothing to convert $WX['MoonAge'] AFAIK, so there must be another bit of code in your configuration doing that.

You can change ajax-dashboard line 301
Code: [Select]
if(true or !isset($moonage))      {$moonage = 'Moon age: '.$mooninfo->age.','.$mooninfo->ill.'%'; }
to (I think) suppress the issue by creating a valid $moonage tag.
« Last Edit: May 03, 2020, 07:43:45 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 PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: BOmaps
« Reply #13 on: May 03, 2020, 07:46:23 PM »
Thanks again Ken. 
I don't recall doing any modification on that but it is possible I did several years ago.  I know know where to start from to get it resolved.


Enjoy,
Paul

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: BOmaps
« Reply #14 on: May 03, 2020, 07:47:37 PM »
Just try the bypass.. no harm/no foul with that.
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 PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: BOmaps
« Reply #15 on: May 03, 2020, 08:42:55 PM »
I made that change on line 301 and errors are gone, Great!
Also making headway on other pages with issues related to {} brackets. 


Enjoy,
Paul

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: BOmaps
« Reply #16 on: May 04, 2020, 12:00:14 AM »
Ready to close this thread...
It has been a long day and much more appreciation of the tedious task and time involved in coding and editing by the likes of Ken, BCJK and others.
I am on PHP 7.4 and no more error_logs in my Saratoga, Cumulus and PWS sites.  Just one site and another script that I had not been keeping up to date to look and see if I should make an attempt or remove them.


Then look at what dead links I have.  I see there are some tools like https://www.brokenlinkcheck.com/ to help with that.


Appreciate all the help... I can enjoy again!
Paul


Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: BOmaps
« Reply #17 on: June 18, 2020, 10:27:26 AM »
Hi Ken,
Reopening this thread as I am constantly getting this in error_log:
Code: [Select]
[18-Jun-2020 10:16:49 America/New_York] PHP Notice:  Uninitialized string offset: 847708058 in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 79 This is the updated GIFEncoder.class.php of May 3rd.


I looked to see if I can spot anything but nothing obvious to me.


Thanks,
Paul

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: BOmaps
« Reply #18 on: June 18, 2020, 04:45:24 PM »
I'm not sure this will work, but try replacing
Code: [Select]
            for ( $j = ( 13 + 3 * ( 2 << ( ord ( $this->BUF [ $i ] [ 10 ] ) & 0x07 ) ) ), $k = TRUE; $k; $j++ ) {
                switch ( $this->BUF [ $i ] [ $j ] ) {
                    case "!":
                        if ( ( substr ( $this->BUF [ $i ], ( $j + 3 ), 8 ) ) == "NETSCAPE" ) {
                            printf    ( "%s: %s ( %s source )!", $this->VER, $this->ERR [ 'ERR03' ], ( $i + 1 ) );
                            exit    ( 0 );
                        }
                        break;
                    case ";":
                        $k = FALSE;
                        break;
                }
            }
with
Code: [Select]
            for ( $j = ( 13 + 3 * ( 2 << ( ord ( $this->BUF [ $i ] [ 10 ] ) & 0x07 ) ) ), $k = TRUE; $k; $j++ ) {
                if(isset($this->BUF [ $i ] [ $j ] )) {
                switch ( $this->BUF [ $i ] [ $j ] ) {
                    case "!":
                        if ( ( substr ( $this->BUF [ $i ], ( $j + 3 ), 8 ) ) == "NETSCAPE" ) {
                            printf    ( "%s: %s ( %s source )!", $this->VER, $this->ERR [ 'ERR03' ], ( $i + 1 ) );
                            exit    ( 0 );
                        }
                        break;
                    case ";":
                        $k = FALSE;
                        break;
                }
                } // end isset
            }
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 PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: BOmaps
« Reply #19 on: June 18, 2020, 05:38:28 PM »
Thanks Ken, and sorry for delay to test it.


I've updated that code and still getting the errors.


Regards,
Paul

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: BOmaps
« Reply #20 on: June 18, 2020, 05:40:52 PM »
Does the error line number correspond to the line
Code: [Select]
switch ( $this->BUF [ $i ] [ $j ] ) {?
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 PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: BOmaps
« Reply #21 on: June 18, 2020, 05:48:40 PM »
error-log is
Code: [Select]
[18-Jun-2020 17:44:23 America/New_York] PHP Notice:  Uninitialized string offset: 1063146529 in /home/psoykkrhjuz3/public_html/BOmaps/GIFEncoder.class.php on line 79Line 79 in GFEncoder.class.php is
Code: [Select]
                if(isset($this->BUF [ $i ] [ $j ] )) {

Paul


Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: BOmaps
« Reply #22 on: June 18, 2020, 05:49:47 PM »
Should have paids more attention -
Line 80 is
Code: [Select]
                switch ( $this->BUF [ $i ] [ $j ] ) {

Paul

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: BOmaps
« Reply #23 on: June 18, 2020, 06:08:12 PM »
Hmmm... maybe try using
Code: [Select]
@switch ( $this->BUF [ $i ] [ $j ] ) { to suppress the error message?
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 PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: BOmaps
« Reply #24 on: June 18, 2020, 06:24:54 PM »

Hi Ken,
I've made the change but unfortunately the error persists...

Paul


 

anything