how can I test the compatibility of php version with php 7.2?

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
websroger
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 133
Joined: Tue Jan 04, 2011 4:23 pm
Location: Fort Collins, CO, USA
Contact:

how can I test the compatibility of php version with php 7.2?

Post by websroger » Wed Dec 04, 2019 5:48 pm

I am getting errors on my Joomla website that I think relate to plugins or a plugin for Joomla 3.x and I think regard the compatibility of the php in the plugin with php7.2. How can I find if a plugin code is not compatible with 7.2?

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8210
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: how can I test the compatibility of php version with php 7.2?

Post by sozzled » Wed Dec 04, 2019 6:08 pm

The usual way to [quickly] see if source code is incompatible with the version of PHP you're using, is to enable Joomla debug mode and set the Error Reporting Level = Maximum in the Global Configuration. That's what I would do. Have you tried that?
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26197
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: how can I test the compatibility of php version with php 7.2?

Post by Per Yngve Berg » Wed Dec 04, 2019 6:50 pm

I would go even higher and set Error Reporting Level = Developer in the Global Configuration.
Will also show deprecated messages.

websroger
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 133
Joined: Tue Jan 04, 2011 4:23 pm
Location: Fort Collins, CO, USA
Contact:

Re: how can I test the compatibility of php version with php 7.2?

Post by websroger » Wed Dec 04, 2019 9:35 pm

I believe I know that there is a php incompatibility, but the problem is finding from which plugin the error is coming. the error message is:
Warning: count(): Parameter must be an array or an object that implements Countable in /home/ncmrc538/public_html/libraries/cms/application/cms.php on line 471

There are a long list of plugins that came with my installation of Joomla that I did not choose, most of which are enabled, and I don't know which I can do without.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8210
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: how can I test the compatibility of php version with php 7.2?

Post by sozzled » Wed Dec 04, 2019 9:52 pm

The "Parameter must be an array or an object that implements Countable" error is [typically] related to software that is not compatible with PHP 7.2 and above; this error should not appear if you are using outdated versions of PHP (e.g. PHP 7.1 and below).

These errors are [relatively] easy to fix. Sometimes the people who developed the extensions that you're using have newer versions that you can download.

These PHP messages are warnings. The biggest problem is that, if left unattended, they will result in creating large error_log files and/or the extensions may metastasise from warnings to "hard" errors. A quick search, using Google, of the phrase "Parameter must be an array or an object that implements Countable" will show you how often this question arises and what people do to fix this kind of problem.

websroger wrote:
Wed Dec 04, 2019 9:35 pm
There are a long list of plugins that came with my installation of Joomla that I did not choose, most of which are enabled, and I don't know which I can do without.
All plugins that "came" with your installation of J! should be compatible with PHP 7.2 unless you are using a very old, outdated version of J! The best remedy for confirming the compatibility of "plugins that came with my installation of Joomla" is to make sure you are using the latest release of J!

At the time of writing, the latest release of J! is J! 3.9.13.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11528
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: how can I test the compatibility of php version with php 7.2?

Post by toivo » Wed Dec 04, 2019 11:44 pm

websroger wrote:There are a long list of plugins that came with my installation of Joomla that I did not choose, most of which are enabled, and I don't know which I can do without.
Was the site originally installed from a standard installation package that had been downloaded from https://downloads.joomla.org or did it originate from a so called Quickstart package, which installs a full Joomla site with third party extensions, some of which can be obsolete and unsupported?

Quickstart packages are often provided by template developers. They are fine as demo sites but often not suitable for live production use.
Toivo Talikka, Global Moderator

websroger
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 133
Joined: Tue Jan 04, 2011 4:23 pm
Location: Fort Collins, CO, USA
Contact:

Re: how can I test the compatibility of php version with php 7.2?

Post by websroger » Thu Dec 05, 2019 12:33 am

The host server for the website uses php7.1, but I admit my Joomla version is out of date - trying to update has for two years given me a website error after installation, which no one has been able to help with (including sozzled)

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8210
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: how can I test the compatibility of php version with php 7.2?

Post by sozzled » Thu Dec 05, 2019 3:40 am

websroger wrote:
Thu Dec 05, 2019 12:33 am
I admit my Joomla version is out of date - trying to update has for two years given me a website error after installation, which no one has been able to help with (including sozzled)
Sorry ... when did you ask me to help you?
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11528
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: how can I test the compatibility of php version with php 7.2?

Post by toivo » Thu Dec 05, 2019 4:39 am

This long thread, started early last year, must the one @websroger means: "Joomla upgrade 3.7 to 3.8 kills website" at viewtopic.php?f=710&t=959514.
Toivo Talikka, Global Moderator

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8210
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: how can I test the compatibility of php version with php 7.2?

Post by sozzled » Thu Dec 05, 2019 5:40 am

Thanks, @toivo. In that long thread—hijacked by someone else—we asked the OP to use the FPA tool. We never saw the FPA report. The discussion was then abandoned.

I assume that the OP abandoned their topic and that was the end of the matter. If someone is serious about wanting help, they will use the FPA tool. We might be able to help if we understand what we're dealing with.

From the sounds of things, we are not dealing with PHP 7.2. In this topic I think we are discussing the hypothetical, "What if I update PHP 7.2, will I have problems?" I don't think we know that answer. Are we discussing the situation where the environment is PHP 7.1 or PHP 7.2?
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

websroger
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 133
Joined: Tue Jan 04, 2011 4:23 pm
Location: Fort Collins, CO, USA
Contact:

Re: how can I test the compatibility of php version with php 7.2?

Post by websroger » Thu Dec 05, 2019 3:57 pm

Wrong: I did use the FPA tool.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8210
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: how can I test the compatibility of php version with php 7.2?

Post by sozzled » Thu Dec 05, 2019 5:53 pm

My apologies. I only read the first of three pages of the older topic. :-[

There's considerably more to digest here and to immerse myself in.

What I would like to know now is what is the question we're trying to answer in this discussion. The question, as I read it, it "How can I test if some software is compatible with its operating environment?" The answer to that question is to create a testing environment, separate from any other environment.

That may sound simple to say (and it's what we try to do) but sometimes it's difficult to execute. To put it another way, if you have a production website and you want to test some changes without affecting the site, you create a development version of the production site elsewhere. When dealing with testing "what would happen if I changed the current version of PHP" (where you may not have the ability to use one version of PHP on one site but a different version of PHP for another site in a situation where both sites reside on the same server) then things become complicated.

Going back to the start of this discussion, I'm not sure I fully understand the question. I apologise for my involvement so far. Let me give this more thought and, perhaps in the meantime, the OP may be able to tell us exactly the situation he's looking at so that we can move forward.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

websroger
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 133
Joined: Tue Jan 04, 2011 4:23 pm
Location: Fort Collins, CO, USA
Contact:

Re: how can I test the compatibility of php version with php 7.2?

Post by websroger » Thu Dec 05, 2019 9:24 pm

Going back to the original question, I am thinking that the problem I have with upgrading to a current version of Joomla is that some of the plugins that are "attached" to the Joomla code may not be compatible in their php code with the latest Joomla. As I have said, there is a long list of them showing in my Admin control panel. So, is there a way to know which of these plugins are actually needed by my website, and then can I check those for php version compatibility? Or, when I do an upgrade, are the plugins in fact upgraded with it? I'd like to get this understood before I try another upgrade.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8210
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: how can I test the compatibility of php version with php 7.2?

Post by sozzled » Thu Dec 05, 2019 9:45 pm

Thank you for rephrasing your question.

websroger wrote:
Thu Dec 05, 2019 9:24 pm
I am thinking that the problem I have with upgrading to a current version of Joomla is that some of the plugins that are "attached" to the Joomla code may not be compatible in their php code with the latest Joomla.
Entirely probable but this statement needs to be teased out more.

Some of your installed plugins may or may not be "core" plugins. That is, some of the extensions used by your website were installed by you, after you created your website, or they were third-party "enhancements" included in a [so-called] "quickstart" installation. Further, it's possible that those extensions were developed for an older version of PHP, that is, not the version of PHP that you're currently using.

I don't think it's a question of "compatibility" (for want of a better term) with "the latest Joomla". From the description of the error message, I think we're discussing about compatibility with the installed version of PHP (not the compatibility with "the latest Joomla") although, in the case of third-party extensions, this question may also arise.

websroger wrote:
Thu Dec 05, 2019 9:24 pm
... there is a long list of extensions showing in my Admin control panel. Is there a way to know which of these plugins are actually needed by my website, and then can I check those for php version compatibility?
Again, this needs to be teased out more. No doubt, if you ran the FPA report, we would see a "long list" (like we saw last time). Using the FPA report you posted last time as an example, everything in blue font is part of the "core" and everything in brown font is optional.

Also, people need to be careful about which plugins they enable. Looking at the example FPA report, in the plugins area, look at the number at the end of the plugin name (after the version): if it's a 1 the plugin is enabled; if it's a zero, the plugin is disabled.

So, the answer to your question, "which plugins are actually needed" by your website depends on (a) whether the extension is a third-party/optional extension, and (b) if the extension has been enabled. I can't answer that question for you today. My advice would be to enable only those things that are needed; compare what is enabled by default on a brand-new, vanilla-flavoured J! website with what you have.

websroger wrote:
Thu Dec 05, 2019 9:24 pm
When I do an upgrade, are the plugins in fact upgraded with it?
It depends on what we're talking about. Are we discussing updating PHP, updating J!, or updating "plugins" associated with a third-party extension? If we're discussing updating PHP then the simple answer is no; the plugins won't be affected. Third-party extensions are not updated automatically when you update J!; those things have to be updated/upgraded separately.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11528
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: how can I test the compatibility of php version with php 7.2?

Post by toivo » Fri Dec 06, 2019 12:00 am

You can test third party extensions and be prepared before the host upgrades PHP to a later version by installing a full backup of the website as a localhost site to your Windows workstation, running Wampserver, which supports several versions of PHP and allows you to switch between them.

The Wampserver forum has the installation instructions as sticky topics at http://forum.wampserver.com/list.php?2. Those topics show how to create alias folders and virtual hosts for several websites or versions of the same site, which is useful for testing third party extensions and running trial updates.
Toivo Talikka, Global Moderator

websroger
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 133
Joined: Tue Jan 04, 2011 4:23 pm
Location: Fort Collins, CO, USA
Contact:

Re: how can I test the compatibility of php version with php 7.2?

Post by websroger » Fri Dec 06, 2019 4:41 am

sozzled: I was referring to upgrading Joomla, and if it comes with compatible plugins. I see from the old FPA output that there are lots of plugins actually used ( in blue, with a 1 following), and very few were third party, such as DirectPHP, and Akeeba.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8210
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: how can I test the compatibility of php version with php 7.2?

Post by sozzled » Fri Dec 06, 2019 4:54 am

Updating J! will update all the blue things (if there have been modifications made to them between the version of J! you have now and the version of J! you will update to—J! 3.9.13, I would assume). Updating J! will not affect any of the brown things.

websroger wrote:
Fri Dec 06, 2019 4:41 am
sozzled: I was referring to upgrading Joomla, and if it comes with compatible plugins.
Compatible with what? Compatible with J! or compatible with PHP? Let me make the as clear as I possibly can.

If something is blue then it is can be assumed to be compatible with J! with an almost 100% degree of confidence; if something is blue then it is can be reasonably assumed to be compatible with PHP (whatever version we're discussing) with about an 80% degree of confidence. If something is brown no-one can make a prediction about its compatibility with (a) J! or (b) PHP.

Does this answer your questions?
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8210
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

What does "compatible" mean? Does "compatibility" affect my ability to update Joomla?

Post by sozzled » Fri Dec 06, 2019 5:14 am

I made the following suggestions a little over a year ago as a way of breaking through our misunderstandings:
sozzled wrote:
Mon Oct 22, 2018 9:50 pm
Here's a tip: there's a Joomla User Group near where you live (in Colorado Springs), a 2½ hour drive or about 240 km away, although they may not be very active. Another suggestion is to contact me and we may be able to arrange something one-on-one via Skype; I'm willing to give you an hour. Contact me using the "contact" feature on the forum if that's something you're happy to do.
I have no recollection of you taking me up on my offer. I renew the offer.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)


Post Reply

Return to “Extensions for Joomla! 3.x”