Page 1 of 1

PHP 8 ?

Posted: Mon 07 Dec 2020 6:40 am
by weatherist34
congratulations to Ken for not veering off the rail track .. happy to say this version is forward compatible with PHP 8 needs no change on first inspection however that said Im not a cumulus user I simply just downloaded of GITHUB and installed into a PHP 8 environment locally , I did or do not have data for rendering charts or getting current forecast/conditions etc.


php8-cu.png
2cu-php8.png

Re: PHP 8 ?

Posted: Mon 07 Dec 2020 3:25 pm
by saratogaWX
Whew! Thanks Brian... the PHP8 developers have chosen to not deprecate any of the basic PHP features used in the CU-HWS (thankfully). I'm hopeful that my other scripts/templates will also work fine. I do tend to stick to code/functions that work from PHP5+ onward.

I've not yet put up my PHP8 testing environment, but will soon. Thanks for giving the distribution a live test.

Stay healthy!!

Best regards,
Ken

Re: PHP 8 ?

Posted: Tue 08 Dec 2020 7:10 am
by weatherist34
i only did a short test nothing in depth as above i dont use cumulus and dont have data to hand for charts etc ,
im so far out of touch or simply forgotten how things work in this version so if had not worked i would have not been much help and just said nothing.

Probably most wont think PHP 8 is important right now(same ignorant viewpoint of how https was viewed when it first raised its head)) but it soon creeps up on you and if hosts make it an option , end user will likely want to use it regardless of advantages or disadvantages and however much you highlight possible issues this advice often gets overlooked until it breaks. so just because you can doesnt mean you have too .. : :D

end of the day end user wont see much advantage if any but they will have the confidence in what there using will work in most PHP environments. for a developer it will make them code smarter and more knowledgeable .

as for healthy , we are healthy but mentally drained from strict stay at home curfews ,work from home,the walls are getting smaller everyday and venturing out is just a nightmare its the downside of living in a city with a dense population of 17 million in a 100km radius..probably no different than any other country suffering the predicted seasonal upturn in cases.

as always stay healthy be prosperous..brian

Re: PHP 8 ?

Posted: Tue 08 Dec 2020 9:37 pm
by ConligWX
Guys, just out of curiosity, whats the verdict on php8.

Re: PHP 8 ?

Posted: Tue 08 Dec 2020 10:48 pm
by saratogaWX
I installed it with XAMPP on my development system for testing. Only found two scripts in the Saratoga templates that needed tweaking (common.php and flyout-menu.php). The former for an un-pre-specified object name, the latter for the XML_SIMPLE change from a resource number to an object (4 lines needed quieting with a @). I'll likely rewrite the flyout-menu.php (and the similar dropdown-menu.php) to remove the old IE6 comments from the output along with using a different XML parsing method.

No idea yet or performance, as it's just a development system. It is reputed to be faster/slimmer than PHP 7.4+, but I'm not going to run any benchmarks.
No other 'gotcha's' found so far in code upward compatibility.. if it runs on 7.4, it will likely run fine on PHP 8. I'm going to wait for PHP 8.0.1 before I do any production website implementations.

Re: PHP 8 ?

Posted: Wed 09 Dec 2020 9:18 am
by weatherist34
ConligWX wrote: Tue 08 Dec 2020 9:37 pm Guys, just out of curiosity, whats the verdict on php8.
nothing significant that would say wow ... i see it from a point of keeping up with evolution , unfortunately many developers wont adapt their code until its broke.i personally would encourage users to install or optional use if possible it would be a great source of ironing out unseen issues , sometimes you need the extra pair of eyes ..

Re: PHP 8 ?

Posted: Wed 09 Dec 2020 10:51 am
by ConligWX
Thanks Brian, I'll play with it over Christmas and see what breaks for me.

Re: PHP 8 ?

Posted: Fri 11 Jun 2021 11:34 am
by Solorize
Hi,

It's been a fair few years since I've posted as been very busy with life etc.

I am now trying to tidy up my website as quite a bit has broken due to neglect ;)

So I thought I would start with trying to update to a newer version of the Cumulus HomeWeatherStation
template, (from here: https://github.com/ktrue/CU-HWS), which seems to have worked ok.

But if I switch from my current PHP version 7.4.20, to the latest PHP version 8.0.7.
then I just get a blank screen and absolutely nothing loads :?

If I switch back to ver 7.4.20 it loads again OK, so must be something is not compatible
with v8+ ?

I found this thread, which seems to mention a similar problem, hence my post.

Is anyone else having this same problem? If so is there a fix or another version which works with PHP8+?

(My concern is that my webhost will eventually force me to update to PHP8+ when they stop supporting it around; 12/2022)


Thanks in advance
Mark