Weather Software > Other Weather Software

Any downside to updating to the latest PHP that my web server provides?

(1/2) > >>

DaleReid:
I got thinking that there have been some updates to the PHP product, and I went to GoDaddy which hosts my Linux server software for my web presence.

I see that I have 5.6 as the version I'm running, and there are more recent versions.

I currently run basically a web page,  but have Meteotemplate, pwsdashboard from Wim van der Kuil, and WDL on it, along with some files I upload and just reference.

At one point I vaguely recall seeing comments that updating to the latest (at that time) version of PHP may cause some problems.

I assume those got ironed out, but is anyone aware of having problems now with updating the PHP on the Linux Server breaking something? 

Should I do the update?

Dale

92merc:
It'll depend on your code.  I'm running mainly Saratoga scripts.  I was on 7.4 version of PHP.  Your message prompted me to check my version as I haven't done that in awhile.
I just updated to 8.0.3.  None of my pages broke.

From a security point of view, the newer the better.

DaleReid:
Thanks, I appreciate the insight, since I'm not sure why in most instances code updates won't run old code except for security reasons.

I know that all software manufacturers are plagued with the problem of releasing new versions, only to have to patch errors that were previously undiscovered with testing.

I don't think that GoDaddy is beyond 7.6 or so, and again am not sure why they don't adopt the most recent releases, even months later.

Isn't PHP a community/general supported language?  Do commercial places like GoDaddy have to pay to use the interpreter versions?

Dale

saratogaWX:
No, PHP is free to use anywhere as it is released under The PHP License, version 3.01 and Copyright (c) 1999 - 2019 The PHP Group.

The usual issue with PHP version upgrades is the deprecation and eventual removal of built-in functions (sometimes for inscrutable reasons).

Widely used in the past, but now removed:

split()  just replace with explode()
each()  so constructs like
--- Code: ---while (list($key,$val) = each($array)) {
--- End code ---
has to change to
--- Code: ---foreach ($array as $key => $val) {
--- End code ---

also more modern versions gripe when you try to use a variable initialized as a string as a number instead.

I've seen these issues exist in older third-party addon PHP scripts.

DaleReid:
Thanks.

These explanations help me understand (not that anyone else does or does not benefit) and coming from those who use the code every day is helpful.

When I had a part time database programming sideline (remember FoxPro?) new versions that have nixed some functions seem odd.

Navigation

[0] Message Index

[#] Next page

Go to full version