Are you still using PHP 5.x? Why?

Chris D

XenForo developer
Staff member
Actually, I know that some of you are still using PHP 5.x because I have this lovely chart:

1526556452307.webp

This is a snapshot of XF 2.0.2+ installs and the version of PHP you are using. It was this information that allowed us to feel comfortable announcing that XenForo 2.1 will require PHP 5.6 and above.

Although the numbers of PHP 5.4 and PHP 5.5 installs are dwindling, and the numbers of PHP 7.x installs are increasing, it's time to turn our focus towards the possibility that one day, we might not support PHP 5.x at all, any longer. In fact, we'd very much like to do that already, but considering most customers are still running PHP 5.6 that certainly isn't a feasible possibility for XF 2.1. Would be lovely to bump the requirements up to PHP 7.x for XF 2.2, though. (2.2 confirmed! :o)

So, if you're still in the 45.2% of XF2 customers (there's potentially many more still using XF1...) who are using PHP 5.x, why is that? Do you run other software that isn't yet PHP 7.x compatible? Does your host not provide the option to upgrade? Do you manage the server yourself, and you're unsure how to perform the upgrade yourself? Have you just not got time? Some other reason?

Genuinely interested to hear some answers. Who knows, maybe we can all help each other make the move.

I'll start!

This site is still running PHP 5.6. We're currently in the process of moving to a new server (we'll announce more about that closer to the time) which will hopefully be running PHP 7.2. The other primary reason for not moving yet is that the front end of the site, customer area and ticket system is all still running a version of XF 1.0! Part of the server migration process will either include the implementation of a new 2.0 based website/back end or if that's not ready then some internal patches to the 1.0 branch will be implemented.
 
We manage our own servers (colo) and run PHP 5.6 (for our vBulletin sites and a few sites with "exotic" software), PHP 7.1 for XF 1.5 (due to a few Add-ons not being compatible with 7.2) and 7.2 for XF2

So basically whatever requirements XF comes up with we'll be able to handle that.
 
I'm using php 7.0+fpm on my forum (attendance is 20k+ per day), this config is very faster than php 5 + apache (and php 5+ fpm), i think many people using old versions, because they don't know about perfomance growth
 
Part of the server migration process will either include the implementation of a new 2.0 based website/back end

Preferably, this would be built on top of your existing XF2 community install, so we don't have to remember 2 passwords/login twice ;)

Liam
 
While I'm running 7.0 on my server and the servers I manage, I would imagine it's a matter of what is directly supported by their server software. IE: Ubuntu 16.04 directly supports 7.0 by it's repositories. 7.2 requires additional 3rd party repositories.

So I'm guessing many people are running older core software on their server which restricts what they can install natively. (Read that as shared hosts that are extremely slow to upgrade)
 
I've actually been pleasantly surprised by the number of shared hosting customers who have access to a cPanel instance which lets them freely choose which PHP version they'd like to use.

But if you're unlucky enough to have a host who doesn't provide this as an option, then I'd highly recommend that you start looking elsewhere.

Anyone have a list of decent shared hosts who provide PHP 7.x support?
 
Out of curiosity, do you have an idea of the lowest percentage of customers using 7.x (currently 54.8%) at which point you'd feel comfortable requiring PHP 7.x for the next major version of XF (2.2)?

Liam
 
Out of curiosity, do you have an idea of the lowest percentage of customers using 7.x (currently 54.8%) at which point you'd feel comfortable requiring PHP 7.x for the next major version of XF (2.2)?

Liam
Probably at least 75% though we’d prefer closer to 90%. I certainly wouldn’t want us to be still supporting PHP 5 when PHP 8 rolls around.

Of course the stats only show us what current customers are using. Depending on where you look, our PHP 7 adoption is somewhat higher than other stats and we wouldn’t want to alienate too many prospective customers by setting the bar too high. Though I appreciate there’s a balance where some customers will never upgrade if they never use software that has higher requirements.
 
The only reason I am on 5.6 and not 7.x is that officially the required minimum is not 7.x. Which means as long as we all don't operate with the same standards, I fear there will be problems with deprecated functions from addons. I am not a dev so I can't comment if there would be problems or not. So I use the safe way to not encounter problems.
 
Last edited:
XenForo itself is declared as compatible with any version of PHP 5.4 up to the current stable PHP version. We even explicitly recommend PHP 7.2 every opportunity we get.

We'd expect developers to test and ensure compatibility of their own code to support the same versions. Some developers insist already on a higher PHP version, which is ok, but they really shouldn't be adding a maximum version below what we support.
 
Currently running XF2 on PHP 7. Everything is fast as it should be. Was using 5.6 for the longest time and recently upgraded once XF2 released.
 
Default CentOS 7.5 (brand-new) is still on PHP 5.4. Some people won't be comfortable to upgrade using a custom repo.
 
Top Bottom