Author Topic: Atom Warnings not working  (Read 783 times)

0 Members and 1 Guest are viewing this topic.

Offline ingogliar

  • Senior Member
  • **
  • Posts: 60
Atom Warnings not working
« on: August 19, 2018, 12:22:42 PM »
Hi All!

Recently, I discontinued using my hosting service to run heightsweather.info using webserver software on my Synology NAS.

The changeover went (for me) surprisingly smoothly - I am still very new to all of this -- EXCEPT that my Atom Warnings are now not working.

I ran what I think is the newest version (1.23) of check-fetch-times.php and received the following result (which I excerpted below, although I attached a snapshot of the complete output):
_______________________________________________________________

Error: Unable to write to ./cache/forecast-NJZ104-test-json.txt file.
Test was NOT successful.
--end NWS Forecast URL check --

Error: Unable to write to ./cache/atom-advisory-NJZ104.txt file.
Test was NOT successful.
--end NWS Warning Zone ATOM/CAP Feed check --

Error: Unable to write to ./cache/uv-forecast.txt file.
Test was NOT successful.
_______________________________________________________________

I am still working on figuring out how to get my old CRON job working, so in the meantime I changed the GENERAL SETTINGS in nws-alerts-config.php to the following

## GENERAL SETTINGS
$noCron        = true;                     // true=not using cron, update data when cache file expires
//                                            false=use cron to update data

I think that I should be automatically updating my two zones without using cron, but no luck.

I KNOW - unequivocally - that the fault is mine: I am doing something incorrectly. Can someone please tell me what I am doing wrong?

Many Thanks.

« Last Edit: August 19, 2018, 12:27:20 PM by ingogliar »

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 949
    • LexMAWeather
Re: Atom Warnings not working
« Reply #1 on: August 19, 2018, 04:39:14 PM »
Does the "cache/" directory exist on the server? From a quick view-source on your site it looks like it doesn't, or does not have the proper write permission.
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline ingogliar

  • Senior Member
  • **
  • Posts: 60
Re: Atom Warnings not working
« Reply #2 on: August 19, 2018, 04:47:20 PM »
Jasiu,

First - thanks for taking a part of your valuable time to help me.

My Synology NAS is running GNU Bash version 4.3.48 and I am still trying to figure out the proper commands in bash to view the file directory. There is a cache file within the directory that  contains the other script files but - if I am understanding you correctly (my fault) - you are saying that there is also a cache file in Linux OS that I should look for, correct?

Again, thanks for the help.

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 949
    • LexMAWeather
Re: Atom Warnings not working
« Reply #3 on: August 19, 2018, 07:03:20 PM »
There should be a cache directory in the same directory where your index.php file exist.

When you are in the shell on the server, do an "ls -l" command (the 'l' is the lower case letter L) in the directory where your index file exists and look for the cache entry.  Post that output here.  Also if that cache directory is there, do "ls -l cache" and post the output.
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline ingogliar

  • Senior Member
  • **
  • Posts: 60
Re: Atom Warnings not working
« Reply #4 on: August 19, 2018, 09:38:02 PM »
Jasiu,

Thank you - I will definitely try that tomorrow and post what I find.

Thanks again and have a nice evening.

Offline ingogliar

  • Senior Member
  • **
  • Posts: 60
Re: Atom Warnings not working
« Reply #5 on: August 20, 2018, 05:15:41 PM »
Jasiu,

Thank you for your patience - I had to go to work and this postponed my trying your suggestions.

I am attaching:

1) contents of cache located on my webserver at web/cache (list of files) - web directory is the location of my index file (as you indicated)

2) I logged into my webserver using bitvise SSH and tried the suggested commands (with the results indicated in attached screenshot). As far as I can tell, my NAS Web Station is running bash version 4.3.48. Are the commands you suggested able to run on my version of Linux?

Again - thanks for the help.

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 949
    • LexMAWeather
Re: Atom Warnings not working
« Reply #6 on: August 20, 2018, 08:24:02 PM »
The "ls" command has been a part of Unix since forever (even before I started using it, and I'm an old man). So, yes, it'll be in any version of Linux!  :grin:

What I need to see are the ls commands done via ssh in the directory where those files from the first image live.  In other words, if you do the "ls -l" and the output list of files doesn't include your index.php, you need to use the cd (change directory) command to get to wherever they are.

Alternatively, if you are using something like Filezilla to transfer the files to the server, that also has the info I'd need ("Remote site" column - make sure the Permissions are visible and take a screen shot).
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 949
    • LexMAWeather
Re: Atom Warnings not working
« Reply #7 on: August 21, 2018, 07:45:26 AM »
Another way to get what I'm looking for:

Edit check-fetch-times.php to add one line.  Find this bit of code (line 740 of last released version):

Code: [Select]
  if(isset($SITE['lang'])) {$Lang = $SITE['lang'];}
  if(isset($SITE['cacheFileDir'])) {$cacheFileDir = $SITE['cacheFileDir'];}
  if (isset($SITE['WUAPIkey'])) {$WUAPIkey = $SITE['WUAPIkey']; } // new V3.00
  if(!isset($WUAPIkey)) { $WUAPIkey = 'c991975b7f4186c0'; // WU key
  }
  $doDebug = true;

Right after that last ($doDebug) line, add:

Code: [Select]
  print "Permissions for " . $cacheFileDir . ": " .
        substr(sprintf('%o', fileperms($cacheFileDir)), -4) . "<br/>";

Upload the file and run check-fetch-times.php again.  A few lines after the header "Checking access to key websites for your template set" you should see a line like:

   Permissions for ./cache/: 0705


https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline ingogliar

  • Senior Member
  • **
  • Posts: 60
Re: Atom Warnings not working
« Reply #8 on: August 21, 2018, 08:07:48 AM »
Jasiu,

Once again - and I hope that you are not tired of hearing this - I thank you so much for taking a part of your time to help me.

I ran the "ls -l" command and attached the results.
I am so new to this that I cannot find a way to list what directories exist on (what I think is the root) in order to change to them. Again, this is my problem with Linux - my ignorance. I am not even sure where I am when I am at when at ingogliar@DS115 . My Synology web station has the files needed to run my page at /web and /web/cache.

I attached the screenshot from Filezilla with the permissions only for the files in the cache (if you needed something else, just ask).

I also followed your recommendation re: modifying the check-fetch-times.php and included those results.

I hope that my struggling through this is indicative of my appreciation of your efforts.

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 949
    • LexMAWeather
Re: Atom Warnings not working
« Reply #9 on: August 21, 2018, 08:23:39 AM »
Bingo.  The "0555" permission on the cache file means you do not have write access turned on. Also, I now notice that Ken's code displays this if you do check-fetch-times.php?show=info

  Cache file directory in $SITE['cacheFileDir']='./cache/' exists, with permissions=dr-xr-xr-x [0555]

 Since you aren't sure how to find your files via the shell (DM me if you want to figure that out), you can add this line just *before* the other one you added to check-fetch-times.php:

Code: [Select]
chmod($cacheFileDir, 0705);
If everything works properly after that, you can remove both those lines from check-fetch-times.php. Once the permissions are set once, they will stick.
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline ingogliar

  • Senior Member
  • **
  • Posts: 60
Re: Atom Warnings not working
« Reply #10 on: August 21, 2018, 12:39:00 PM »
Jasiu,

Again, thanks.

Unless I am obtuse, and did not follow your instructions exactly (screenshots attached), I made the revisions to the check-fetch-times.php, saved it, uploaded and replaced the old one, and ran the new one once in place. To me, it does not look as if anything was changed.

With your expert advice I will try whatever you next suggest.

 

anything