Are you still using PHP 5.x? Why?

@Ludachris it looks like you need to ensure the memcache extension is enabled for PHP 7.2 (they're managed on a per-version basis in WHM I believe).

You can verify this on a command line with this command:
Code:
/opt/cpanel/ea-php72/root/usr/bin/php -m | grep memcache
If it returns nothing, it's not installed.

If you need to install it, the steps are something like this (I haven't done this in a while):
  • In WHM, go to Module Installers
  • Click on Manage for PHP Pecl
  • Choose ea-php72 and press Apply
  • Search for "memcache"
  • Click install
There are two extensions in PHP, memcache and memcached but I'm pretty sure it's the first one you need to install.

I did test this on my production WHM server (not the one I use for my xF server) and it failed, which led me to a Stack Overflow guide on doing it in the terminal: https://stackoverflow.com/a/48380759
 
Good suggestion there Chris, I'll remove those directories.

I created a copy of the site on a sub-domain. I disabled all plugins via the config file and changed PHP to 7.2 and got the same error. I checked the admin panel and I see a memcached error. Could that be the cause? Here's the error:

Code:
Zend_Cache_Exception: The memcache extension must be loaded for using this backend ! - library/Zend/Cache.php:209


Memcached version is memcached-1.4.15-10.el7_3.1
Normally you have to have the memcache AND the memcached PECL's installed for PHP.
 
for 7.2 as James pointed out above. I need to verify.
Usually those two are not done automatically by cPanel/WHM when setting up the PHP environment. It's been a while since I messed with cPanel/WHM, but there should be a section of setting up what PECL's you want.
 
You'll need to make sure the PHP memcached extension for PHP 7.2 is installed using EasyApache 4's PECL manager in WHM
 
Turns out it probably has nothing to do with any of that - I'm still running XF 1.5.14, which I just found from another post is known to have issues with PHP 7.2. I need to upgrade the core script.
 
🤬

So I created a dev environment on a sub-domain of my live site and upgraded my XF version to the latest 1.5.23 and upgraded all add-ons and theme. I then made sure memcache was installed for 7.2 and changed the PHP version from 5.6 to 7.2 and it worked just fine. Success!!! I then did the same procedure for the live site... and when I go to change the PHP version and the site breaks. I revert back to 5.6 and see in the XF admin panel that there are memcache errors. WTF?!?! I've confirmed with the host that memcache is installed and running - hell, it's running on the sub-domain so shouldn't that mean it automatically is running on the main domain too? For the hell of it, I tried 7.1 and the site loads. Something just doesn't work with 7.2. I disabled all listeners in the config file to turn off add-ons and it still errors out with 7.2.
 
Turns out the host did not confirm memcache was running, only memcached. Re-installed memcache and it is now fixed. What a long morning.

Also, the host had this to say about memcache... "Just to mention one other thing in general memcache extension is no longer maintained as the memcached is so it would be good to speak to your developers and tweak the site to use memcached instead of memcache."
 
XF does support memcached as well, you just have to configure it appropriately.
I've read somewhere that both memcache and memcached need to be running. In fact, I had memcached running and received those errors until memcache was installed.
 
 
So, it's been a while since we looked at where we are with the spread of PHP versions. For comparison see the first post.

197243
Although it is encouraging to see 67.3% of people now using PHP 7.x (which is up from 54.8% last May) it still feels like there is work to be done if there's any chance that we would consider increasing the minimum requirements in a future XF version.

So, why are you still using PHP 5.x?

As a side note, in case it wasn't clear, PHP 7.3 should be a viable option for everyone (if you are using the latest version of 1.5, 2.0 or 2.1). 7.3.2 is out already, but 7.3.1 is a reasonable target too (just avoid 7.3.0 because it had a fairly problematic bug which has since been resolved).
 
So, why are you still using PHP 5.x?

It would be interesting to see if you got any responses and additional conversions by directly reaching out to your entire customer base via email to make them aware of the PHP upgrade options and situation. Not everyone will stumble across this thread.

Perhaps linking them to a blog post or informative page in the manual informing them of the benefits and what they need to do to check compatibility or what they need to tell their host to convince / nudge them to upgrade.

I also wonder how many of the users in your graph above are still on XF1 vs XF2.

Are you able to filter out any inactive/dead sites from those results where the admins might not care to check these forums, or read your email, or don't have any intention of ever upgrading the software let along the php version on their server?


As an aside - has anyone running Wordpress had any issues with 7.3.x or know of any good compatibility checking tools?

The only reason I've not upgraded to that is I've got a few WP sites on my server with a ton of add ons for each, and I'm not sure how to easily check the compatibility of every single WP add on on those sites.
 
Only intended to be a simple and informal discussion at this point, rather than full scale market research...

I also wonder how many of the users in your graph above are still on XF1 vs XF2.
They are all on XF 2.0.2 or above and most of them are running XF 2.1.0 (which is now our most installed version).

Are you able to filter out any inactive/dead sites from those results
The chart is installations that have submitted stats to us within the last 45 days - stats are collected when a site is upgraded or within 4-6 weeks (whichever is sooner). So it only includes active installs and people who haven’t opted out of the stats collection.
 
Ahh interesting. I'm actually surprised that it's such a high percentage still on 5.x then, considering it's 2.0.2 and above and the data is so recent.
 
it still feels like there is work to be done if there's any chance that we would consider increasing the minimum requirements in a future XF version.
If you don't give owners a reason to upgrade PHP why would they? Require it and they will. Many owners set it and forget it. No real reason other than we are busy and updating PHP isn't usually a priority.
 
So, why are you still using PHP 5.x?

As I've said before, it's that most people don't care. Here on the forum, you get the xF enthusiasts and potential tinkerers, etc. But most people just install it, have their host install it, etc., and that's the end of it. It works, so there is absolutely no reason to upgrade. I can't control what people do with their dedicated servers or VPS, but I know I'd have shared hosting clients still using PHP 4 if I didn't force them to upgrade.
 
Although it is encouraging to see 67.3% of people now using PHP 7.x (which is up from 54.8% last May) it still feels like there is work to be done if there's any chance that we would consider increasing the minimum requirements in a future XF version.
Indeed great to see the improvement - PHP 7.2+ FTW
 
@Chris D have you considered that the use of PHP 5.5 and below has been practically wiped out possibly because XF raised the minimum to PHP 5.6? Anyone with desire to upgrade to XF 2.1 will have upgraded their PHP 5.5 and below by now. My guess is that if XF 2.2 would come with a PHP 7 minimum this could likely be followed by quick PHP7 adoption by XF customers.
 
  • Like
Reactions: ENF
Top Bottom