Author Topic: Support of the "Leuven" Forecast scripts  (Read 6507 times)

0 Members and 1 Guest are viewing this topic.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1856
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #50 on: April 02, 2021, 04:33:00 AM »
Hi
Could I please have help to fix this problem  All was good until yesterday.  I have not changed any script.  My website is:  https://www.kstwx.net/wxnorwayfcst.php.  The first attachment is a screenshot from my desktop whilst the second is what appeared on my iPad today.  Yesterday both appeared on my desktop (Win 10).
Thanks
Keith

Thanks for using the Leuven forecast script. 
Never knew there was a user of them in Australia https://support.leuven-template.eu/userlistScripts.php

Answered in this topic with post #41 by @kyomar and #42 by me, just before your question:
https://www.wxforum.net/index.php?topic=36478.msg426228#msg426228

As you are using an older version, the line numbers are:
wsMetnoCreate.php => line 52
wsUFct4.php => line 58

Wim
« Last Edit: April 02, 2021, 04:56:36 AM by wvdkuil »
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

Offline griffo42

  • Senior Member
  • **
  • Posts: 94
    • Carina Weather
Re: Support of the "Leuven" Forecast scripts
« Reply #51 on: April 02, 2021, 09:07:48 PM »
Hi

Thanks for your quick response:  all fixed.  By all means, add me to the users list for Norway forecasts.  https://www.kstwx.net/index.php.

best wishes

Keith

https://www.kstwx.net/index.php
Davis Vantage Pro2 Model #6152AU
Cumulus latest version
Saratoga Weather World template Cumulus plugin
Carina Weather, Brisbane.

Offline MarkDM

  • Member
  • *
  • Posts: 5
    • Weerstation Berlare
Re: Support of the "Leuven" Forecast scripts
« Reply #52 on: April 08, 2021, 12:31:02 PM »
Hello,
I noticed my forecast page was not working anymore. Thanks to this thread a found the cause.
But there is a problem in the solution. The script is working, even stand-alone without enclosing html:
https://weerstationberlare.be/wsfct4/wsFctMetnoPage4.php

I adapted the file wsMenuData.xml for it:
Quote
<item   nr      = "wsForecast"   
        caption = "Forecast"
        link    = "wsfct4/wsFctMetnoPage4.php"         
        gizmo   = "1"   
/>
This not working, the menu-button "Vooruitzicht" (translated) keeps pointing to the old target:
https://weerstationberlare.be/

Is there something else I have to activate ? It doesn't seems a cache problem.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1856
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #53 on: April 08, 2021, 01:02:07 PM »
Hello,
I noticed my forecast page was not working anymore. Thanks to this thread a found the cause.
But there is a problem in the solution. The script is working, even stand-alone without enclosing html:
https://weerstationberlare.be/wsfct4/wsFctMetnoPage4.php

I adapted the file wsMenuData.xml for it:
Quote
<item   nr      = "wsForecast"   
        caption = "Forecast"
        link    = "wsfct4/wsFctMetnoPage4.php"         
        gizmo   = "1"   
/>
This not working, the menu-button "Vooruitzicht" (translated) keeps pointing to the old target:
https://weerstationberlare.be/

Is there something else I have to activate ? It doesn't seems a cache problem.
This is a thread for the stand-alone (+Saratoga) forecast scripts.
They are not integrated with the Leuven-Template. They are having multiple errors as they are not positioned at the correct folder.
Code: [Select]
Warning: include_once(./ws_set_environment.php): failed to open stream: No such file or directory in /home/uitber1q/weerstation/wsfct4/wsFctMetnoPage4.php on line 144

Warning: include_once(): Failed opening './ws_set_environment.php' for inclusion (include_path='.:/opt/alt/php70/usr/share/pear') in /home/uitber1q/weerstation/wsfct4/wsFctMetnoPage4.php on line 144

Warning: include(./_metric_settings.php): failed to open stream: No such file or directory in /home/uitber1q/weerstation/wsfct4/wsFctMetnoPage4.php on line 146

Warning: include(): Failed opening './_metric_settings.php' for inclusion (include_path='.:/opt/alt/php70/usr/share/pear') in /home/uitber1q/weerstation/wsfct4/wsFctMetnoPage4.php on line 146

Fatal error: Uncaught Error: Call to undefined function ws_debug_times() in /home/uitber1q/weerstation/wsfct4/wsFctMetnoPage4.php:152 Stack trace: #0 /home/uitber1q/weerstation/index.php(331): include() #1 {main} thrown in /home/uitber1q/weerstation/wsfct4/wsFctMetnoPage4.php on line 152
It is a lot more work  to use the stand-alone scripts. https://weerstationberlare.be/wsfct4/readme.html
You need to run them in an iFrame if using them in any template.

Better use the built-in version in the Leuven Template
The UV and MetNo forecast scripts in the Leuven-Template need only a small modification
=> https://support.leuven-template.eu/problems28.php?lang=nl
Or on the HWA forum at https://www.hetweeractueel.nl/forum/viewtopic.php?f=226&t=70313&sid=b89f274a86cca82b4948c976598fada3#p73098

Wim
« Last Edit: April 08, 2021, 01:09:20 PM by wvdkuil »
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

Offline MarkDM

  • Member
  • *
  • Posts: 5
    • Weerstation Berlare
Re: Support of the "Leuven" Forecast scripts
« Reply #54 on: April 08, 2021, 03:10:24 PM »
Thank you Wim.
It works again with this small modification on the original script.
Regards,
Mark

Offline lacouste

  • Member
  • *
  • Posts: 23
Re: Support of the "Leuven" Forecast scripts
« Reply #55 on: October 05, 2021, 04:09:57 AM »
hello everyone today all of the forecast scripts have stopped working. i thought the met.no is going to keep working that seems to have shut down as well. What gives on your side. Good day to you
i havz that on all yr met no ect.....
no forecast data can be retrieved, check the html for errors
« Last Edit: October 05, 2021, 04:12:34 AM by lacouste »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1856
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #56 on: October 05, 2021, 04:52:46 AM »
hello everyone today all of the forecast scripts have stopped working. i thought the met.no is going to keep working that seems to have shut down as well. What gives on your side. Good day to you
i havz that on all yr met no ect.....
no forecast data can be retrieved, check the html for errors
Hi @lacouste,

I am confused about the word "all in your message"
I currently support 9 different forecast scripts. Only 1 has some intermittent problems until February 1, 2022 and will stop working on that date.

As announced end of 2020 by Yr.no  their xml-forecast will not be functional in the near future.
From  October 1st, the yr.no forecasts API in the current format, example  https://www.yr.no/place/Belgium/Flanders/Herent/varsel.xml has indeed "man-made" problems to warn you of that change. 

This is their message they will return for a few days, then they will supply the data again for a few day/weeks and that message / data will be repeated until February 1 next year.:
Quote
This service will be retired on February 1st, 2022. Please go to https://developer.yr.no/doc/guides/getting-started-from-forecast-xml/ to get started with our new API. This service will have random interuptions until the final end of life date February 1st, 2022.

When you read the information on the developer.yr.no pages, you see that they switched to using met.no data directly.

THEREFOR there is no need to develop a new yr.no script as the data is identical as used in the current met.no script.

The met.no forecast scripts works without problems, now and in the "foreseeable" future.  ;)

Regards,

Wim

P.S. I started with 12 forecast scripts and indeed 4 data-sets are not available anymore.   
Not bad for scripts from 2015-2018 also considering that only 18 users helped supporting those scripts directly.
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

Offline lacouste

  • Member
  • *
  • Posts: 23
Re: Support of the "Leuven" Forecast scripts
« Reply #57 on: October 05, 2021, 05:34:59 AM »
hello kim I am also confused because as you announced yn.ro had to stop working so for that no problem on the other hand in my wsfct4 folder the rest of the programs no longer work also I still have error messages
for http://meteolimoux.fr/wsfct4/wsFctDarksPage4.php
 I have This scripts needs an API-key, please check the docs

for metno http://meteolimoux.fr/wsfct4/wsFctMetnoPage4.php I have no forecast data can be retrieved, check the html for errors

for http://meteolimoux.fr/wsfct4/wsFctWuPage4.php I have This scripts needs an API-key, please check the docs

for http://meteolimoux.fr/wsfct4/wsFctWxsimPPage.php I have Error input file not found, cache file not found either => ../ complaintxt.txt
Scripts failed, check html for problems

for yahoo I have No data was retrieved for https://query.yahooapis.com/v1/public/yql?q=select+*+from+weather.forecast+where+woeid+in+(SELECT+woeid+FROM+geo .places + WHERE + text = "(43.071812,2.217438)") + & format = json

no forecast data can be retrieved, check the html for errors

all the programs no longer work in my folder

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1856
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #58 on: October 05, 2021, 05:53:21 AM »
hello kim I am also confused because as you announced yn.ro had to stop working so for that no problem on the other hand in my wsfct4 folder the rest of the programs no longer work also I still have error messages
for http://meteolimoux.fr/wsfct4/wsFctDarksPage4.php
 I have This scripts needs an API-key, please check the docs

for metno http://meteolimoux.fr/wsfct4/wsFctMetnoPage4.php I have no forecast data can be retrieved, check the html for errors

for http://meteolimoux.fr/wsfct4/wsFctWuPage4.php I have This scripts needs an API-key, please check the docs

for http://meteolimoux.fr/wsfct4/wsFctWxsimPPage.php I have Error input file not found, cache file not found either => ../ complaintxt.txt
Scripts failed, check html for problems

for yahoo I have No data was retrieved for https://query.yahooapis.com/v1/public/yql?q=select+*+from+weather.forecast+where+woeid+in+(SELECT+woeid+FROM+geo .places + WHERE + text = "(43.071812,2.217438)") + & format = json

no forecast data can be retrieved, check the html for errors

all the programs no longer work in my folder
I think you maybe have an old download?
Please check the current working scripts
=> https://support.leuven-template.eu/
===> https://www.weerstation-herent.be/wsfct4/

WU an Yahoo stopped years ago, they are therefor not in the demo.

Yr.no will have the "nag" message for a few days and will on/off work again until Februari next year.

DarkSky always needs an API-key, the scripts will work at least to end of December 2022.
But DarkSky will not accept new users as it was bought by Apple. If you have no DarkSky api key, the scripts will not work.

WXSIM can only be used when you have the paid-for WXSIM forecasting programs (windows only) and upload the data files to your web-site.

Met.no should work, but the API url changed so check these two topics for the answer here
https://www.wxforum.net/index.php?topic=36478.msg426228#msg426228
There the change needed in line 50 of wsIncMetnoCreate.php is described

@ALL Please always check the support => demo-site and see if it works there.  [tup]

Wim
« Last Edit: October 05, 2021, 05:55:22 AM by wvdkuil »
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

Offline lacouste

  • Member
  • *
  • Posts: 23
Re: Support of the "Leuven" Forecast scripts
« Reply #59 on: October 05, 2021, 07:18:17 AM »
hi wilm i made the modification on line 50 but i get this error message
unknown error Warning: file_put_contents(./cache/wsIncMetnoHtml4_c_mm_kmh_hpa_cm_km_43-071812_2-217438.arr): failed to open stream: No such file or directory in /customers/5/5/d/meteolimoux.fr/httpd.www/wsfct4/ws_set_environment.php on line 181
ws_save_cache: ERROR Could not save data to cache (./cache/wsIncMetnoHtml4_c_mm_kmh_hpa_cm_km_43-071812_2-217438.arr).
Please make sure your cache directory exists and is writable.
Program ends

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1856
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #60 on: October 05, 2021, 07:32:10 AM »
hi wilm i made the modification on line 50 but i get this error message
unknown error Warning: file_put_contents(./cache/wsIncMetnoHtml4_c_mm_kmh_hpa_cm_km_43-071812_2-217438.arr): failed to open stream: No such file or directory in /customers/5/5/d/meteolimoux.fr/httpd.www/wsfct4/ws_set_environment.php on line 181
ws_save_cache: ERROR Could not save data to cache (./cache/wsIncMetnoHtml4_c_mm_kmh_hpa_cm_km_43-071812_2-217438.arr).
Please make sure your cache directory exists and is writable.
Program ends

I think the message (in red) is very clear.

Are you sure you have officially downloaded the scripts between 2018 and today?

There should be a folder with the name "cache", it should be in your  wsfct4/  folder in your download area in your pc/mac also.

Normally when you upload the wsfct4 folder from the pc/mac to your webserver, all folders and scripts are copied and ​get the same "rights" as in the download.

So it is nearly impossible that the cache/ folder is not there.  Check your download folder.
Or use your FTP program to create a cache folder inside your  wsfct4 folder.

If you check the contents of your wsfct4 folder it should look more or less like this screenshot, 7 folders and a lot of scripts.

Wim
« Last Edit: October 05, 2021, 07:34:28 AM by wvdkuil »
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

Offline lacouste

  • Member
  • *
  • Posts: 23
Re: Support of the "Leuven" Forecast scripts
« Reply #61 on: October 05, 2021, 12:00:00 PM »
I just looked I downloaded the folder on 08/02/2018 I don't have a cache file in the meteolimoux.fr / wsfct4 / subfolder
I have img, js, lang, other, pp, saratoga root, on the other hand I have a cache file in the img folder
https://filemanager.one.com/#matthieu.coustal@wanadoo.fr/meteolimoux.fr/files/wsfct4/img/cache/

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1856
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #62 on: October 05, 2021, 12:02:29 PM »
I just looked I downloaded the folder on 08/02/2018 I don't have a cache file in the meteolimoux.fr / wsfct4 / subfolder
I have img, js, lang, other, pp, saratoga root, on the other hand I have a cache file in the img folder
https://filemanager.one.com/#matthieu.coustal@wanadoo.fr/meteolimoux.fr/files/wsfct4/img/cache/
You need a cache folder inside the wsfct4/ folder.
That is what is needed for the scripts to save the data as downloaded from met.no

Succes,
Wim
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

Offline lacouste

  • Member
  • *
  • Posts: 23
Re: Support of the "Leuven" Forecast scripts
« Reply #63 on: October 05, 2021, 12:11:46 PM »
ok can I simply create it manually in my manger file from my web folder?

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1856
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #64 on: October 05, 2021, 12:16:33 PM »
ok can I simply create it manually in my manger file from my web folder?
Yes, I hope so.
Also check if the error goes away after  that.
If not use your FTP program ow whatever to give the correct permissions.

Wim
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

Offline lacouste

  • Member
  • *
  • Posts: 23
Re: Support of the "Leuven" Forecast scripts
« Reply #65 on: October 05, 2021, 12:22:43 PM »
thank you wilm it works now thank you =D&gt;

Offline ha-rob

  • Member
  • *
  • Posts: 2
    • UranusWeather
Re: Support of the "Leuven" Forecast scripts
« Reply #66 on: November 11, 2021, 11:20:30 AM »
Hello. I have used the Leuven template for many years. I have not done any changes in the script for a long time. A few days ago the script stopped working. Only a completely empty, grey page appears when typing the url: www.uranusweather.com

I hope for some help to fix this.

Best wishes :-)

Rob

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1856
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #67 on: November 11, 2021, 12:16:43 PM »
Hello. I have used the Leuven template for many years. I have not done any changes in the script for a long time. A few days ago the script stopped working. Only a completely empty, grey page appears when typing the url: www.uranusweather.com

I hope for some help to fix this.

Best wishes :-)

Rob
Hi Rob,
 
PHP-version:
Checking with info.php => your provider or you yourself changed your website  to using PHP Version 8.0.12
That is a big change from 5.6 or 7.4 for which the template was tested.
And you will probably run into far more errors, if you continue to use PHP 8.0.xx versions for this template.

This topic you posted this question is for the Leuven-Forecast scripts discussion but your problem is in the Leuven-Template.
Next time,  post your questions in the template topic https://www.wxforum.net/index.php?topic=36504.0

Debug:
Running your website with "?debug=yes" shows the error is in wsAjaxDataLoad_v3.php
Code: [Select]
Parse error: syntax error, unexpected token "-",
expecting "]" in /customers/a/6/7/uranusweather.com/httpd.www/weather2/wsAjaxDataLoad_v3.php on line 451
The error  is a "parse error" and signals the script contains invalid PHP, and all further processing stops after a parse error.
So indeed you will have an empty grey page.

Script-source:
Listing the script with https://www.uranusweather.com/weather2/printScript.php?echo=wsAjaxDataLoad_v3.php
Line 451 is a comment line in your version and should not be parsed at all.
Seems a problem with the PHP-parser to me, not with the script.

Solution:
I copied your script and tested it with PHP 8.0.12 at my test-site => same error.
Change line 451 of your weather2/wsAjaxDataLoad_v3.php  from
Code: [Select]
#[forecast-text]to
Code: [Select]
# [forecast-text]Adding that extra space between the # and the rest of the comment removes the parsing error.

Wim

Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

Offline ha-rob

  • Member
  • *
  • Posts: 2
    • UranusWeather
Re: Support of the "Leuven" Forecast scripts
« Reply #68 on: November 11, 2021, 04:15:14 PM »
Hello. I have used the Leuven template for many years. I have not done any changes in the script for a long time. A few days ago the script stopped working. Only a completely empty, grey page appears when typing the url: www.uranusweather.com

I hope for some help to fix this.

Best wishes :-)

Rob
Hi Rob,
 
PHP-version:
Checking with info.php => your provider or you yourself changed your website  to using PHP Version 8.0.12
That is a big change from 5.6 or 7.4 for which the template was tested.
And you will probably run into far more errors, if you continue to use PHP 8.0.xx versions for this template.

This topic you posted this question is for the Leuven-Forecast scripts discussion but your problem is in the Leuven-Template.
Next time,  post your questions in the template topic https://www.wxforum.net/index.php?topic=36504.0

Debug:
Running your website with "?debug=yes" shows the error is in wsAjaxDataLoad_v3.php
Code: [Select]
Parse error: syntax error, unexpected token "-",
expecting "]" in /customers/a/6/7/uranusweather.com/httpd.www/weather2/wsAjaxDataLoad_v3.php on line 451
The error  is a "parse error" and signals the script contains invalid PHP, and all further processing stops after a parse error.
So indeed you will have an empty grey page.

Script-source:
Listing the script with https://www.uranusweather.com/weather2/printScript.php?echo=wsAjaxDataLoad_v3.php
Line 451 is a comment line in your version and should not be parsed at all.
Seems a problem with the PHP-parser to me, not with the script.

Solution:
I copied your script and tested it with PHP 8.0.12 at my test-site => same error.
Change line 451 of your weather2/wsAjaxDataLoad_v3.php  from
Code: [Select]
#[forecast-text]to
Code: [Select]
# [forecast-text]Adding that extra space between the # and the rest of the comment removes the parsing error.

Wim

Many thanks for your quick response, Wim,

I checked my email inbox and found an email from my provider some weeks ago where they notified me about a future php upgrade to version 8.0. So you have right. Thatīs the reason for my problems. I have tried the solution you suggested, but unfortunately it didnīt work. What I did instead, was to roll back to php version 7.4. But the sad thing is that my provider says the version 7.4 reaches "end of life" at 2022.11.28.

But so far so god. And I apologize for posting this in the wrong topic. Anyway, thanks for your tip.  [tup]

Rob

 

anything