WXforum.net

Weather Station Hardware => Blitzortung => Topic started by: PaulMy on May 02, 2020, 05:21:06 PM

Title: BOmaps
Post by: PaulMy 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





Title: Re: BOmaps
Post by: saratogaWX 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).

Title: Re: BOmaps
Post by: PaulMy 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
Title: Re: BOmaps
Post by: vreihen on May 03, 2020, 10:17:14 AM
Does this help with PHP 7.4+?????

https://stackoverflow.com/questions/59158548/array-and-string-offset-access-syntax-with-curly-braces-is-deprecated (https://stackoverflow.com/questions/59158548/array-and-string-offset-access-syntax-with-curly-braces-is-deprecated)
Title: Re: BOmaps
Post by: PaulMy 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
Title: Re: BOmaps
Post by: PaulMy 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



 
Title: Re: BOmaps
Post by: saratogaWX 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.
Title: Re: BOmaps
Post by: PaulMy on May 03, 2020, 11:59:17 AM

Again thanks Ken, and no more errors in BOmaps.


Now on to others...


Enjoy,
Paul
Title: Re: BOmaps
Post by: saratogaWX on May 03, 2020, 12:12:13 PM
If you find others in my scripts, please let me know...
Title: Re: BOmaps
Post by: PaulMy 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







Title: Re: BOmaps
Post by: saratogaWX 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
Title: Re: BOmaps
Post by: PaulMy 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
Title: Re: BOmaps
Post by: saratogaWX 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.
Title: Re: BOmaps
Post by: PaulMy 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
Title: Re: BOmaps
Post by: saratogaWX on May 03, 2020, 07:47:37 PM
Just try the bypass.. no harm/no foul with that.
Title: Re: BOmaps
Post by: PaulMy 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
Title: Re: BOmaps
Post by: PaulMy 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

Title: Re: BOmaps
Post by: PaulMy 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
Title: Re: BOmaps
Post by: saratogaWX 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
            }
Title: Re: BOmaps
Post by: PaulMy 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
Title: Re: BOmaps
Post by: saratogaWX on June 18, 2020, 05:40:52 PM
Does the error line number correspond to the line
Code: [Select]
switch ( $this->BUF [ $i ] [ $j ] ) {?
Title: Re: BOmaps
Post by: PaulMy 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

Title: Re: BOmaps
Post by: PaulMy on June 18, 2020, 05:49:47 PM
Should have paids more attention -
Line 80 is
Code: [Select]
                switch ( $this->BUF [ $i ] [ $j ] ) {

Paul
Title: Re: BOmaps
Post by: saratogaWX on June 18, 2020, 06:08:12 PM
Hmmm... maybe try using
Code: [Select]
@switch ( $this->BUF [ $i ] [ $j ] ) { to suppress the error message?
Title: Re: BOmaps
Post by: PaulMy on June 18, 2020, 06:24:54 PM

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

Paul

Title: Re: BOmaps
Post by: PaulMy on June 19, 2020, 11:01:19 AM
I have been regularly deleting the error logs as it generates about 7,000 of that error line per minute.  I just deleted one with 52,562,396,777 bytes after about 12 hours.
Also there was a new file .pureftpd.3776669.3f60a910 in the same BOmaps folder that contained the same error lines and deleted that as well.  This file has not returned, yet, after I deleted it.


I presume I would need to stop the cron jobs to stop the errors for now?


Thanks,
Paul



Title: Re: BOmaps
Post by: saratogaWX on June 19, 2020, 11:49:57 AM
7,000 per minute  :shock:

I just tried replicating the issue on my localhost (PHP 7.4.5) and checking on my production host (PHP 7.4.7) with error_reporting(E_ALL) and see no errors at all.

Have you tried using error_reporting(0) in the script to suppress the error?
Are you running the 1.05 version of BOmaps?
What is the PHP version for your system?
Title: Re: BOmaps
Post by: PaulMy on June 19, 2020, 01:38:39 PM
Thanks Ken,
after about 2 hours the err_log file was 4,964,698,223 bytes and too large to open :(
[size=78%] [/size]

I have only found such code in gen-BO-maps.php and it has
Code: [Select]
# error_reporting(E_ALL);[/size]which I assume is error reporting Off.
[/size]
However I have changed that to
Code: [Select]
error_reporting(0)and the errors still persist.


 Should it exist in another file where I can add that code to suppress?


I have BOmap-V1.03 of 22/05/2015 with BO-maps-V1.05-update of 30/10/2018 two files BOmapgen-inc.php and BO-station-inc.php, and with the recent GIFEncoder.class.php and your suggested modification to this of yesterday.


[/size]I am with GoDaddy and using PHP v7.4
[/size]
Thank you for your time to check this.
Paul











Title: Re: BOmaps
Post by: PaulMy on June 19, 2020, 01:42:00 PM
Strange things in my last post... and that missed:
I am with GoDaddy and using PHP 7.4


Thanks,
Paul



Title: Re: BOmaps
Post by: saratogaWX on June 19, 2020, 02:25:55 PM
I suggest doing the following:
1) suspend the cron job running get-BO-maps.php
2) use the cPanel running processes page to see and kill any PHP processes still running get-BO-maps.php
3) delete the huge error_log
4) restart the cron job

monitor the error_log for additional entries like the ones before.  If found, suspend the cron again.
Title: Re: BOmaps
Post by: PaulMy on June 19, 2020, 03:33:13 PM
Thank you Ken,
I ended calling GoDaddy as I could not find cPanel running processes page and support advised to toggle the PHP version to clear whatever might be the cause, and that worked.  Back on PHP 7.4 and do not have that previous error message.  However there is a new error message that shows at each 5-min interval -
Code: [Select]
[19-Jun-2020 19:20:01 UTC] PHP Parse error:  syntax error, unexpected '$region' (T_VARIABLE) in /home/psoykkrhjuz3/public_html/BOmaps/gen-BO-maps.php on line 12

The first 12 lines of gen-BO-maps.php are -
Code: [Select]
<?php
# gen-BO-maps.php
#
# This is the main control/settings for the Blitzortung map generator
# It should be run via a cron job at 5 minute intervals.
#
#--------------------------------------------------------------------------------
# settings to adjust
#
# error_reporting(E_ALL);
error_reporting(0)
$region"3";             # Blitzortung REGION number
so the error shows for $region= "3";


Any suggestion how to fix this one?


Regards,
Paul
Title: Re: BOmaps
Post by: saratogaWX on June 19, 2020, 03:54:40 PM
Yes, easy... you're missing the semi-colon after error_reporting(0)

Should be

error_reporting(0);

Title: Re: BOmaps
Post by: PaulMy on June 19, 2020, 04:43:20 PM
Thanks again Ken and no more errors on this page, that is one I should have known :oops: :oops:


Enjoying,
Paul
Title: Re: BOmaps
Post by: saratogaWX on June 19, 2020, 04:56:23 PM
So has the excessive error_log issue been fixed?
Title: Re: BOmaps
Post by: PaulMy on June 19, 2020, 06:01:27 PM
Hi Ken,
Code: [Select]
So has the excessive error_log issue been fixed?
Yes fixed.  There is no error_log file now in BOmaps and all seems good.


Enjoy,
Paul



Title: Re: BOmaps
Post by: saratogaWX on June 19, 2020, 07:02:47 PM
 [tup]  =D&gt;