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
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
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!
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
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
or
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:
The opcache.so 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.
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.
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