How to change & upgrade system PHP version

On the web server page in Nodeworx I enabled PHP 7.3.11 and set it as the default version. It shows up in Siteworx and works according to phpinfo files. The system PHP version is still 7.2.24 but I’d like set it to 7.3.11 also and have only one PHP 7.x installation that’s available for both the server and Siteworx accounts. How is this done?

I thought “system PHP” and “server PHP” were the same thing; if so something isn’t right. If I load the server’s host name in a browser /var/www/html/info.php reports 7.3.11 installed just like the siteworx sites do, but php -v -i as the root user in shell returns 7.2.24 installed.

7.2.24 is using /etc/php.ini
7.3.11 is using /etc/opt/remi/php73/php.ini

I’ve looked here

and here

but I’m not connecting the dots on how to change the system PHP version.

Is sorting this out as simple as uninstalling 7.2.24 and the remi-php72 repository?

Hi sysnop

Sorry it?s late here

Setting default php is the default NEW siteworx installs will use

If you want to change the default php version used by existent siteworx installs, you need to edit the siteworx setup from nodeworx siteworx and edit siteworx

System php is system php and only really detected by softaculous so needs updating to php 7 or softaculous will throw warnings when trying to install

Many thanks


Hi John,

I understand how default PHP works with Siteworx and I was able to switch accounts from 7.2.24 to 7.3.11 after enabling it and setting it as default.

What I wasn’t clear enough about was that I wanted the same newer version for system/server/Siteworx, in which case PHP Integration Mode shouldn’t have been necessary in the first place, except that I was trying to keep PHP 5.6 for a specific script. I decided 5.6 can wait and removed every older PHP version and their remi repos except 7.3.11 and got the result I wanted using yum update.

Hopefully I bothered you with this in the morning hours and not late at night. Thanks!

Hi sysnop

Many thanks and I?m in uk

I think the issue is that people do not realise interworx does not use system php and until multiphp was introduced, did not install any php versions (with exception to the IW php IW use itself)

Now with multiphp, it installs versions upto latest available from Remi repo for your distro

However, it does not install any php applications you may need - so you have to update php versions with any packages you need

If your script runs under siteworx account, set that to php56 and update system php to php 7n

I think to be honest, when setting default php version on an existent siteworx it should also set the original default php set, so it matches or otherwise you would have an issue with say cron jobs running original php and not showing errors because of mismatch of php versions

Many thanks



The multiphp feature has never been hard to grasp, I just don’t have sure footing on how different binaries and config files are spread out over the file system (read below) with this feature enabled. However, I’ve never forgotten that Interworx runs its own instances of Apache and PHP (and to leave both alone!).

Currently PHP 7.3.11 along with ioncoube is installed for the system and Siteworx accounts. My only concern is that –

yum install php73-php-ioncube-loader
yum install php73-php-opcache

is not enough to get them working straight away. Uploading the .so file and this line in /etc/php.d/ioncoube.ini got it working:

zend_extension = /usr/lib64/php/modules/

The .ini file in /etc/opt/remi/php73/php.d/ was throwing me off.

Opcache is more elusive and I can’t get it working.

If I use /etc/php.d/opcache.ini (copied manually) Apache fails on restart.

If I use /etc/opt/remi/php73/php.d/opcache.ini (installed copy) Apache restarts without error but opcache isn’t loading, verified by php -v.

PHP 7.3.11 (cli) (built: Oct 22 2019 08:11:04) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright © 1998-2018 Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.3.9, Copyright © 2002-2019, by ionCube Ltd.

The file installs in /opt/remi/php73/root/usr/lib64/php/modules/ and using the original line or the absolute path in the .ini file doesn’t work.

I think I need to disable the multiphp feature if possible in order to simplify file locations. I really don’t need multiphp if Siteworx uses system PHP.

Hi sysnop

Many thanks and sorry for not making myself clear

Your php -v is only looking at system php and not siteworx php

Installing for system php you use yum install opcache or it might be php-opcache or whatever it is

Yum install php73-php-opcache or whatever installs into the multiphp version and not system php

So they are different with different yum install commands and in different locations to each other

Does this make it clearer

To find locations used for each, upload a info.php to a siteworx using system php and 1 using php 7.3

Then view in browser and you have locations including php.ini used for each or I can post when back

You cannot copy .so or .ini files and it will work

Many thanks


Thanks John! That explanation helps a great deal. So all my troubles started with the wrong packages. I’ll take another leap into it later. Meanwhile, is there a way to disable the multiple PHP feature so that there’s only a ‘system’ PHP for the server and siteworx accounts? I think iworx updates turned it off previously after I started using only one PHP version. Then I turned it back on and wish I hadn’t.

Btw, I was able to load opcache by moving/renaming 10-opcache.ini to /etc/php.d/opcache.ini. But this evidently isn’t the right way to do it.

Thanks again.

Hi sysnop

Many thanks

Yes to turn off goto nodeworx services web server and change php fpm to php I think it is

If not, just set everything to system php and do not give access to other php versions by untucking them saving and restarting apache

To be fair, it makes no difference if available though and simple to control once you understand they are all separate and yum install is used by separate command

yum install php-(app) installs to system php

yum install phpNN-php-(app) installs to different multi php version where NN is php version installing so say php 56, 70, 71 etc

Many thanks


Hi sysnop

Sorry I meant to also state to remember to restart services or it would not show

I made that mistake before

So restarting apache should work for system php and if multiphp, restart all php-fpm services from nodeworx, system services web server

Many thanks


Hey John,

I removed all my previous mistakes and then –

yum install php-ioncube-loader
yum install php-opcache

Restarted httpd and it’s all good…

php -v

PHP 7.3.11 (cli) (built: Oct 22 2019 08:11:04) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright © 1998-2018 Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.3.9, Copyright © 2002-2019, by ionCube Ltd.
with Zend OPcache v7.3.11, Copyright © 1999-2018, by Zend Technologies

phpinfo pages are showing the same for Siteworx hosts.

You’re right, the waters are less scary after getting dunked a few times. I should be able to get control of the multiple PHP options so I’ll keep it.

Mucho thanks for straightening me out.