Page 4 of 4

Re: meteotemplate php 8.0/8.1

Posted: Thu Feb 16, 2023 11:38 pm
by panxabuida
Good night guys;
my service provider is going to drop support for php7.4 and
I spend hours and hours reading your suggestions and changes.
I have updated with the latest davidefa files but I can't get the station status and station block to work, stopping to update the database but it does update the current block.
my pay is panxabuida.es

What can I do or what can I look at?

thank you

Re: meteotemplate php 8.0/8.1

Posted: Thu Feb 16, 2023 11:58 pm
by spd2612
Well all the updated need to be put together in a pre release
It does work im using php 8.1
Keep in mind you may have to sacrifice some of the third party blocks and plugins but that time was coming some of those developers have moved on
David has been a real asset to keeping Meteotemplate still running
If you have done Dave's
updates and still have issues some debugging may have to be done if you dont know how just ask there are a lot of good people on here that can tell you how
Good luck


Good luck

Re: meteotemplate php 8.0/8.1

Posted: Fri Feb 17, 2023 9:25 am
by lemimi
Hello,
To update some of my programs written in php and rather than correct errors line by line, I recently discovered Rector.
It does help! Even if that does not accomplish everything.
It is a program that automatically upgrades and refactors your application's PHP code.
See here: https://github.com/rectorphp/rector
and even online directly: https://www.phptools.online/php-checker
More info by searching for Rector PHP 8 with your favorite search engine.
Do not forget to put or switch your local or remote server to php 8: a program that runs in php 8 may not work at all in 7 and even less in 5!
If that can help...
Good day... Michel

Re: meteotemplate php 8.0/8.1

Posted: Sat Feb 18, 2023 2:01 am
by panxabuida
spd2612 wrote: Thu Feb 16, 2023 11:58 pm Well all the updated need to be put together in a pre release
It does work im using php 8.1
Keep in mind you may have to sacrifice some of the third party blocks and plugins but that time was coming some of those developers have moved on
David has been a real asset to keeping Meteotemplate still running
If you have done Dave's
updates and still have issues some debugging may have to be done if you dont know how just ask there are a lot of good people on here that can tell you how
Good luck


Good luck
thanks for the comment.
I started again from scratch, left everything as it was with the backup copy and installed the files modified by davidefa one by one from the first php v1 to v 1.1 and now it's working.
some blocks don't work as expected but none important.
I'll be in php 8.0 for a few days and I'll go to php8.1 and even php 8.2 if possible.

Thanks again for the help, especially for Davidafe.

Re: meteotemplate php 8.0/8.1

Posted: Tue Mar 07, 2023 8:39 pm
by livefeed
Any help here would be much appreciated as I'm pulling my hair out!
The display of my webpage is completely messed up. I have updated all the files as mentioned earlier in this thread I've even tried a brand new fresh install, but the page layout using Safari on a Mac or chrome looks a mess even on a PC. Were is the problem? is it in the database or in the files as like I said with a clean install, I get the same output.

http://www.nitram-media.com/weather
PHP 8.1

Re: meteotemplate php 8.0/8.1

Posted: Wed Mar 08, 2023 8:42 am
by FSC830
Please describe as exact as possible, what you did.
Looks, like some formatting is missing.

Regards

Re: meteotemplate php 8.0/8.1

Posted: Wed Mar 08, 2023 8:47 am
by lemimi
Good morning,
Your address with HTTP points to HTTPS.
If I force from my browser to open without security, your site is displayed normally.
Good day... Michel

Re: meteotemplate php 8.0/8.1

Posted: Wed Mar 08, 2023 8:54 am
by FSC830
Indeed... :D
But seems, that some blocks are still not updated (endless spinner) for PHP 8.x.

Regards

Re: meteotemplate php 8.0/8.1

Posted: Wed Mar 08, 2023 7:42 pm
by livefeed
Thank you all that replied, yes is was a http-https setting.
I have now updated plugins and all should be working, Thank again.

Re: meteotemplate php 8.0/8.1

Posted: Sun Mar 19, 2023 7:08 am
by meteoesine
Hello,
checking for any ?errors this warning appears to me. How can i fix it?
many tnx in advance

Warning: Undefined variable $moreclouds in /.../template/scripts/headerMetar.php on line 832

if ($moreclouds == "yes") {
$returner = "$returner$cumulus";
} else {
$returner = false;
}
return $returner;
}

and also if running headerMetar.php
Warning: Undefined variable $baseURL in /home/cldvlwax/public_html/template/scripts/headerMetar.php on line 36
Warning: Undefined variable $baseURL in /home/cldvlwax/public_html/template/scripts/headerMetar.php on line 42


P.S. @FSC830 scripts are already installed
/header.php
/scripts/functions.php
/scripts/headerMetar.php
/homepage/css/themeSetter.php
/homepage/blocks/current/currentBlock.php

Re: meteotemplate php 8.0/8.1

Posted: Sun Mar 19, 2023 9:01 am
by FSC830
Hm, may that I did find this after uploading the last archive, but my file is slightly different.
Here its not line 832, but line 835:

Code: Select all

if ((isset($moreclouds)) && ($moreclouds == "yes")) {
The $baseURL issue was not seen at my site yet!?
Need to investigate this.

But when calling your site

Code: Select all

https://meteoesine.it/template/indexDesktop.php?errors
no errors are thrown!?

Regards

Re: meteotemplate php 8.0/8.1

Posted: Sun Mar 19, 2023 12:43 pm
by meteoesine
true, I noticed it too after cleaning the pc with ccleaner ... :shock: :?

Re: meteotemplate php 8.0/8.1

Posted: Mon Mar 20, 2023 12:50 am
by atari
updated currentBlock.php not woking on my config,Im using v18, good work 8-)
tested & runing on php8.2

Re: meteotemplate php 8.0/8.1

Posted: Mon Mar 20, 2023 7:49 am
by FSC830
Hi,
"not working" is not a good description, what exactly is wrong?
Looking at your site https://neutrino-digital.com/template/i ... on=21.4173 currentBlock seems working as designed!?

Regards

Re: meteotemplate php 8.0/8.1

Posted: Mon Mar 20, 2023 8:28 am
by atari
On v18 its working showing meteo data, but whan i try to update it show only time, all senzor are gone.
Btw Im using cumulus to send data to web.