Error on block "marsWeather"

Post Reply
User avatar
Meteofabro
Observer
Observer
Posts: 35
Joined: Wed Aug 23, 2017 5:20 pm
Location: Fabro
Station model: Davis Vantage Vue
Software: Meteobridge RED PRO
Contact:

Error on block "marsWeather"

Post by Meteofabro » Fri May 27, 2022 11:17 am

Why does the "marsWeather" block no longer work? some info?
Image

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Error on block "marsWeather"

Post by davidefa » Tue Jun 21, 2022 3:27 pm

This is the error returned by your server running the block script ( http://meteofabro.altervista.org/homepa ... php?errors ):

Code: Select all

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; moonPhase has a deprecated constructor in /membri/meteofabro/scripts/functions.php on line 1099

Warning: file_get_contents(http://cab.inta-csic.es/rems/wp-content/plugins/marsweather-widget/api.php): failed to open stream: HTTP request failed! in /membri/meteofabro/homepage/blocks/marsWeather/marsWeatherBlock.php on line 38

Warning: array_key_exists() expects parameter 2 to be array, null given in /membri/meteofabro/homepage/blocks/marsWeather/marsWeatherBlock.php on line 40
Data currently N/A
The file_get_contents fails ( but it works correctly on my altervista test site ).
Check ( on the altervista control panel ) that risorse->'Modifica Impostazioni PHP'->'Collegamento esterno senza restrizioni' is enabled ( to enable it they send you a code to your cell phone via sms )
Image

User avatar
Meteofabro
Observer
Observer
Posts: 35
Joined: Wed Aug 23, 2017 5:20 pm
Location: Fabro
Station model: Davis Vantage Vue
Software: Meteobridge RED PRO
Contact:

Re: Error on block "marsWeather"

Post by Meteofabro » Mon Jun 27, 2022 1:09 pm

Ciao David...

Ho gia il link dei collegamenti esterni attivo.... qualche idea per risolvere il problema? ho riportato il php anche alla versione 7.1, prima era alla versione 7.3.
Attachments
2022-06-27 15_05_07-AlterVista - Spazio web gratis.png
2022-06-27 15_05_07-AlterVista - Spazio web gratis.png (72.22 KiB) Viewed 810 times
Image

User avatar
Meteofabro
Observer
Observer
Posts: 35
Joined: Wed Aug 23, 2017 5:20 pm
Location: Fabro
Station model: Davis Vantage Vue
Software: Meteobridge RED PRO
Contact:

Re: Error on block "marsWeather"

Post by Meteofabro » Mon Sep 26, 2022 11:08 am

I SOLVED it by putting data from the "https://" block on the external links instead of the canonical "http://".
Surely the problem is felt only on the Altervista servers after the activation of the secure "HTTPS" protocol.
Other blocks and Plugins with the same error could be corrected with the same practice.
Image

Post Reply