Author Topic: Meteotemplate  (Read 137633 times)

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Meteotemplate
« Reply #225 on: November 01, 2016, 04:46:26 PM »
Thanks, the instructions call to:

Quote
for your CRON job you will need two things - the URL and the interval. For the interval choose ideally one minute. This obviously depends on the interval you set for your realtimeMT.txt update. If you are updating that file every 5 minutes for example, there is obviously no point in reading its content every minute and it would only overload your server. The recommended realtimeMT.txt upload and therefore also the CRON job interval, is one minute. The database will be updated every 5 minutes, the data will be read in minute intervals and cached and the database will be updated every 5 minutes with the cache average.
the URL for the CRON job will be the URL of your weatherCat.php script inside your weatherCat plugin directory. So it will look something like this:

http://www.mysite.com/template/plugins/weatherCat/weatherCat.php?password=12345

I've already figured out how to set the interval; the easy part. I don't know what the command would be to invoke the plugin.
And I've successfully invoked the plugin by poking the address into the browser, so I know that works.

Thanks

The CRON "command" can be almost anything thing the computer/server can do. Perhaps if you can describe what you need/want to be done, we can describe a "command". I'm barely above the noob stage as CRON knowledge goes, but it's really just typing a few words, it's not 'rocket science'. [computer] [lol]

I needed a command to download a few METAR reports from a NOAA site. All I did was write a small PHP file (get_curl_METAR.php) that does that. I used a CRON 'job' on my hosting service that simply runs that PHP 'program'. You've already 'played' with that part of the process. ThU32:-)

In my case the 'command' is:
Code: [Select]
php /path/php file/my web space/get_curl_METAR.php >/dev/null 2>&1I ended up using the suggested ">/dev/null 2>&1" which totally blocks any error reports as well any most other output to any email address you have registered with your hosting company. You should probably leave that bit of text off until you're sure your job works correctly. It looks like your host uses the same cPanel as mine and that?s really all you need to set things up.
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Meteotemplate
« Reply #226 on: November 01, 2016, 04:53:48 PM »
OK climate fixed
Thanks, got that plugged into the setup now.

I've manually invoked the weatherCat.php, and it imported data into the table. I thought doing that would at least let me see the web page, but so far, all I have is this:



I obviously have something set wrong, probably the path. I've tried several options and haven't hit on the right one yet.
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Meteotemplate
« Reply #227 on: November 01, 2016, 05:20:56 PM »
Quote
And I've successfully invoked the plugin by poking the address into the browser, so I know that works.
The address for the plugin is not the way it would look on the web. You are not really 'talking' to your site like you would be when using a browser from somewhere in the world. You are talking to the servers at your hosting service, so the "path" is lightly different. ;)

Here's the actual "path" I used in my example above: /home3/my-account-name/public_html/mid-southweather.com/

You should be able to see the exact text to use in cPanel if you look at the "Files Manager" section. The beginning of the files 'tree' will have the first two parts of the "path" (/home3/my-account-name). Generally, the next piece is /public_html/ Lastly, the domain name for your site. Then, you'd put the name of the file/plugin that your already know. It might be easier to simply write it out in TextEdit in one continuous line and then paste it into the text box in the cPanel CRON page (my host doesn't have a very large text box, you can't see the whole 'command' in there). After you click the "Add..." button (whatever it's called) you usually can then see the full command at the bottom of the page.


BTW, I use the same "typing" method as you described: "poking"! Usually with one finger per hand! [blush] cmu:-)
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #228 on: November 01, 2016, 05:35:20 PM »
This seems to be a known "problem".

If you only see the header, check your PHP version and let me know what it is, my guess is it is lower than 5.4

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Meteotemplate
« Reply #229 on: November 01, 2016, 06:32:21 PM »
This seems to be a known "problem".

If you only see the header, check your PHP version and let me know what it is, my guess is it is lower than 5.4

Item   Detail
Hosting Package   HD_sHD2
Server Name   dime184
cPanel Version   58.0 (build 32)
Apache Version   2.4.18
PHP Version   5.6.24
MySQL Version   10.1.17-MariaDB
Architecture   x86_64
Operating System   linux
Shared IP Address   66.7.193.146
Path to Sendmail   /usr/sbin/sendmail
Path to Perl   /usr/bin/perl
Perl Version   5.14.4
Kernel Version   2.6.32-642.6.199.2.cpanel6.x86_64
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #230 on: November 01, 2016, 06:39:47 PM »
OK, in that case go to your Main settings, right at the very bottom enable debugging mode. Then look at your homepage and copy here all the errors you get

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Meteotemplate
« Reply #231 on: November 01, 2016, 06:47:34 PM »
Quote
And I've successfully invoked the plugin by poking the address into the browser, so I know that works.
The address for the plugin is not the way it would look on the web. You are not really 'talking' to your site like you would be when using a browser from somewhere in the world. You are talking to the servers at your hosting service, so the "path" is lightly different. ;)

Here's the actual "path" I used in my example above: /home3/my-account-name/public_html/mid-southweather.com/

You should be able to see the exact text to use in cPanel if you look at the "Files Manager" section. The beginning of the files 'tree' will have the first two parts of the "path" (/home3/my-account-name). Generally, the next piece is /public_html/ Lastly, the domain name for your site. Then, you'd put the name of the file/plugin that your already know. It might be easier to simply write it out in TextEdit in one continuous line and then paste it into the text box in the cPanel CRON page (my host doesn't have a very large text box, you can't see the whole 'command' in there). After you click the "Add..." button (whatever it's called) you usually can then see the full command at the bottom of the page.


BTW, I use the same "typing" method as you described: "poking"! Usually with one finger per hand! [blush] cmu:-)

Yep, mine's similar, with my path being:

php /home/xxxxxxxxxxxx/public_html/avon-weather.com/templates/plugins/weatherCat/weatherCat.php

And I successfully created a CRON job. But I get an email telling me"

Quote
Status: 404 Not Found
X-Powered-By: PHP/5.6.24
Content-type: text/html; charset=UTF-8

No input file specified.

Thanks for your suggestions!
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Meteotemplate
« Reply #232 on: November 01, 2016, 06:50:00 PM »
OK, in that case go to your Main settings, right at the very bottom enable debugging mode. Then look at your homepage and copy here all the errors you get

Quote
Notice: Undefined variable: moreclouds in /home/smorris/public_html/avon-weather.com/template/scripts/headerMetar.php on line 832

Notice: Undefined variable: getConditions in /home/smorris/public_html/avon-weather.com/template/scripts/headerMetar.php on line 908
Data for block updates could not be loaded from meteotemplate.com. If you have problems with this feature and it still does not work, then contact me (Jachym) or disable the update check in your main setup.
Data for block updates could not be loaded from meteotemplate.com. If you have problems with this feature and it still does not work, then contact me (Jachym) or disable the update check in your main setup.
8.0 mph
   Meteotemplate
Brno   
Template unregistered

Fatal error: Call to undefined function session_status() in /home/smorris/public_html/avon-weather.com/template/menu.php on line 21

Thanks for helping with this, Jachym
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #233 on: November 01, 2016, 06:52:52 PM »
Are you using your own server? Because this is strange, the error is generated by undefined station_status function, which however should be supported by 5.4+

http://php.net/manual/en/function.session-status.php

Can you ask your provider? Or if using your own server, check that you really have this installed correctly, it should definitely be part of 5.6

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #234 on: November 01, 2016, 06:54:41 PM »

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Meteotemplate
« Reply #235 on: November 01, 2016, 07:02:54 PM »
Are you using your own server? Because this is strange, the error is generated by undefined station_status function, which however should be supported by 5.4+

http://php.net/manual/en/function.session-status.php

Can you ask your provider? Or if using your own server, check that you really have this installed correctly, it should definitely be part of 5.6

I am using a commercial hosting company called HostDime. I've been with them for about 17 years, and they host a lot of commercial accounts. Mine is a personal account of morrisgarage.com, where avon-weather.com is a subdomain. "smorris" is my account name in the path.

I wouldn't begin to know what to ask them, as I know nothing about server stuff. All I know how to do is some basic HTML and blindly following instructions for things I don't understand. The latter frequently gets me in situations like this.  :)
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Meteotemplate
« Reply #236 on: November 01, 2016, 07:05:23 PM »
https://forums.freebsd.org/threads/55236/

I looked at the linked page, but I don't know what any of that means. Maybe I should stick with my current web page. ;)
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Meteotemplate
« Reply #237 on: November 01, 2016, 07:14:34 PM »
Quote
Yep, mine's similar, with my path being:

php /home/xxxxxxxxxxxx/public_html/avon-weather.com/templates/plugins/weatherCat/weatherCat.php

And I successfully created a CRON job. But I get an email telling me"

Quote
Status: 404 Not Found
X-Powered-By: PHP/5.6.24
Content-type: text/html; charset=UTF-8

No input file specified.
OK, I'll pass the baton on to jachym, as I don't use his very nice and amazingly complete template. [blush] He will probably know what the file/plugin-name that you need to be using (I'm assuming it is something he has in his template).
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


wurzelmac

  • Storm
  • *****
  • Posts: 1361
    • ITIROLPR2
    • Wetterstation Pr?graten am Gro?venediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini 2023 M2 8/256 | 1x Canon EOS 1300D | macOS Sonoma 14.2
Re: Meteotemplate
« Reply #238 on: November 01, 2016, 07:23:27 PM »
Hi Steve,

what about trying it with this ( https://cron-job.org/en/ ) one just as test?

(If nothing other helps...)

Update:
Another shot in the blue: With my webhoster (HostEurope) I did have problems with read/write permissions, maybe you have to set permissions manual.
Reinhard


jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #239 on: November 01, 2016, 07:30:00 PM »
Use cron-job.org.

I use external webhosting and I know nothing about servers... but the above is a safe bet