PHP-SCL - can't select version for Virtual Host

v7
php

(Dan) #1

NethServer Version: 7.4
Module: php-scl

I’ve installed the php-scl module following the wiki’s instructions. Installation proceeded without apparent issue, but when I try to set a virtual host to use a different PHP version, I get this (completely useless) error at the top of the page:
image
The system log is a bit more useful:

May 20 22:24:21 neth systemd: Reloading.
May 20 22:24:21 neth esmith::event[23956]: [INFO] service php71-php-fpm restart
May 20 22:24:21 neth systemd: Stopping The PHP FastCGI Process Manager...
May 20 22:24:21 neth systemd: Starting The PHP FastCGI Process Manager...
May 20 22:24:21 neth systemd: Started The PHP FastCGI Process Manager.
May 20 22:24:21 neth systemd: Reloading.
May 20 22:24:21 neth esmith::event[23956]: [INFO] service httpd reload
May 20 22:24:21 neth systemd: Reloaded The Apache HTTP Server.
May 20 22:24:21 neth esmith::event[23956]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [1.250633]
May 20 22:24:21 neth esmith::event[23956]: Event: vhost-modify SUCCESS
May 20 22:25:15 neth /sbin/e-smith/db[24713]: /var/lib/nethserver/db/vhosts: OLD wx=vhost|Access|public|Description|Weather display|ForceSslStatus|enabled|FtpStatus|disabled|Indexes|disabled|PasswordStatus|disabled|PhpAllowUrlfOpen|disabled|PhpMaxExecTime|disabled|PhpMaxFileUploads|disabled|PhpMemoryLimit|0|PhpPostMaxSize|0|PhpUpMaxFileSize|0|PhpVersion|default|ServerNames|wx.familybrown.org|SslCertificate||status|enabled
May 20 22:25:15 neth /sbin/e-smith/db[24713]: /var/lib/nethserver/db/vhosts: NEW wx=vhost|Access|public|Description|Weather display|ForceSslStatus|enabled|FtpStatus|disabled|Indexes|disabled|PasswordStatus|disabled|PhpAllowUrlfOpen|disabled|PhpMaxExecTime|disabled|PhpMaxFileUploads|disabled|PhpMemoryLimit|0|PhpPostMaxSize|0|PhpUpMaxFileSize|0|PhpVersion|php72|ServerNames|wx.familybrown.org|SslCertificate||status|enabled
May 20 22:25:15 neth esmith::event[24717]: Event: vhost-modify wx
May 20 22:25:15 neth esmith::event[24717]: expanding /etc/httpd/conf.d/virtualhosts.conf
May 20 22:25:15 neth dbus[562]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
May 20 22:25:15 neth dbus-daemon: dbus[562]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
May 20 22:25:15 neth systemd: Starting Time & Date Service...
May 20 22:25:15 neth dbus[562]: [system] Successfully activated service 'org.freedesktop.timedate1'
May 20 22:25:15 neth dbus-daemon: dbus[562]: [system] Successfully activated service 'org.freedesktop.timedate1'
May 20 22:25:15 neth systemd: Started Time & Date Service.
May 20 22:25:21 neth esmith::event[24717]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [5.558229]
May 20 22:25:21 neth esmith::event[24717]: Action: /etc/e-smith/events/vhost-modify/S10nethserver-php-fpm_pool_creation SUCCESS [0.236261]
May 20 22:25:21 neth esmith::event[24717]: Action: /etc/e-smith/events/vhost-modify/S30nethserver-virtualhosts-setbasicpassword SUCCESS [0.177942]
May 20 22:25:21 neth esmith::event[24921]: Event: nethserver-vsftpd-save
May 20 22:25:21 neth esmith::event[24921]: expanding /etc/vsftpd/user_list
May 20 22:25:21 neth esmith::event[24921]: expanding /etc/vsftpd/vsftpd.conf
May 20 22:25:21 neth esmith::event[24921]: expanding /etc/vsftpd/chroot_list
May 20 22:25:21 neth esmith::event[24921]: expanding /etc/vsftpd/ftpusers
May 20 22:25:21 neth esmith::event[24921]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.262713]
May 20 22:25:22 neth esmith::event[24921]: Action: /etc/e-smith/events/nethserver-vsftpd-save/S20nethserver-vsftpd-mkdir SUCCESS [0.142237]
May 20 22:25:22 neth esmith::event[24921]: Action: /etc/e-smith/events/nethserver-vsftpd-save/S30nethserver-virtualhosts-ftp-chroot SUCCESS [0.190245]
May 20 22:25:22 neth esmith::event[24921]: Action: /etc/e-smith/events/nethserver-vsftpd-save/S40nethserver-vsftpd-setpasswd SUCCESS [0.154571]
May 20 22:25:22 neth esmith::event[24928]: Event: nethserver-firewall-base-save nethserver-vsftpd-save
May 20 22:25:22 neth esmith::event[24928]: Action: /etc/e-smith/events/nethserver-firewall-base-save/S02providers-cleanup SUCCESS [0.201106]
May 20 22:25:22 neth esmith::event[24928]: expanding /etc/shorewall/zones
May 20 22:25:22 neth esmith::event[24928]: expanding /etc/shorewall/tcpri
May 20 22:25:22 neth esmith::event[24928]: expanding /etc/shorewall/mangle
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/actions
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/policy
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/rules
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/providers
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/hosts
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/modules
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/snat
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/rtrules
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/masq
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/nat
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/tcinterfaces
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/interfaces
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/stoppedrules
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/shorewall.conf
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/maclist
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/shorewall/tunnels
May 20 22:25:23 neth esmith::event[24928]: expanding /etc/lsm/lsm.conf
May 20 22:25:23 neth esmith::event[24928]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.697536]
May 20 22:25:23 neth systemd: Reloading.
May 20 22:25:24 neth kernel: ipt_ULOG: ULOG: fail to register logger.
May 20 22:25:24 neth kernel: ipt_ULOG: ULOG: fail to register logger.
May 20 22:25:24 neth logger: Shorewall reloaded
May 20 22:25:24 neth esmith::event[24928]: [NOTICE] Shorewall restart
May 20 22:25:24 neth esmith::event[24928]: Action: /etc/e-smith/events/nethserver-firewall-base-save/S89nethserver-shorewall-restart SUCCESS [1.312892]
May 20 22:25:24 neth systemd: Reloading.
May 20 22:25:24 neth esmith::event[24928]: [INFO] service lsm is disabled: skipped
May 20 22:25:24 neth esmith::event[24928]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [0.273215]
May 20 22:25:24 neth esmith::event[24928]: Event: nethserver-firewall-base-save SUCCESS
May 20 22:25:24 neth esmith::event[24921]: Action: /etc/e-smith/events/nethserver-vsftpd-save/S60firewall-adjust SUCCESS [2.571791]
May 20 22:25:25 neth systemd: Reloading.
May 20 22:25:25 neth esmith::event[24921]: [INFO] service vsftpd is disabled: skipped
May 20 22:25:25 neth esmith::event[24921]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [0.247234]
May 20 22:25:25 neth esmith::event[24921]: Event: nethserver-vsftpd-save SUCCESS
May 20 22:25:25 neth esmith::event[24717]: Action: /etc/e-smith/events/vhost-modify/S60nethserver-virtualhosts-ftp-save SUCCESS [3.644567]
May 20 22:25:25 neth systemd: Reloading.
May 20 22:25:25 neth esmith::event[24717]: [INFO] service php72-php-fpm restart
May 20 22:25:25 neth systemd: Stopping The PHP FastCGI Process Manager...
May 20 22:25:25 neth systemd: Starting The PHP FastCGI Process Manager...
May 20 22:25:25 neth php-fpm: [20-May-2018 22:25:25] ERROR: unable to bind listening socket for address '/var/run/php-fpm/wx-php72.sock': No such file or directory (2)
May 20 22:25:25 neth php-fpm: [20-May-2018 22:25:25] ERROR: FPM initialization failed
May 20 22:25:25 neth systemd: php72-php-fpm.service: main process exited, code=exited, status=78/n/a
May 20 22:25:25 neth systemd: Failed to start The PHP FastCGI Process Manager.
May 20 22:25:25 neth systemd: Unit php72-php-fpm.service entered failed state.
May 20 22:25:25 neth esmith::event[24717]: Job for php72-php-fpm.service failed because the control process exited with error code. See "systemctl status php72-php-fpm.service" and "journalctl -xe" for details.
May 20 22:25:25 neth systemd: php72-php-fpm.service failed.
May 20 22:25:25 neth esmith::event[24717]: [WARNING] restart service php72-php-fpm failed!
May 20 22:25:25 neth systemd: Reloading.
May 20 22:25:25 neth esmith::event[24717]: [INFO] service php70-php-fpm reload
May 20 22:25:25 neth systemd: Reloaded The PHP FastCGI Process Manager.
May 20 22:25:25 neth systemd: Reloading.
May 20 22:25:25 neth esmith::event[24717]: [INFO] service php56-php-fpm reload
May 20 22:25:25 neth systemd: Reloaded The PHP FastCGI Process Manager.
May 20 22:25:25 neth systemd: Reloading.
May 20 22:25:26 neth esmith::event[24717]: [INFO] service php71-php-fpm restart
May 20 22:25:26 neth systemd: Stopping The PHP FastCGI Process Manager...
May 20 22:25:26 neth systemd: Starting The PHP FastCGI Process Manager...
May 20 22:25:26 neth systemd: Started The PHP FastCGI Process Manager.
May 20 22:25:26 neth systemd: Reloading.
May 20 22:25:26 neth esmith::event[24717]: [INFO] service httpd reload
May 20 22:25:26 neth systemd: Reloaded The Apache HTTP Server.
May 20 22:25:26 neth esmith::event[24717]: Action: /etc/e-smith/events/actions/adjust-services FAILED: 1 [1.147442]
May 20 22:25:26 neth esmith::event[24717]: Event: vhost-modify FAILED

The system PHP version is 7.2:
image
…and a phpinfo() page in /var/www/html/ reflects that. But with the virtual host set to anything other than “default”, it doesn’t work.


Lock to "current release" enabled by default from 7.5
(Stéphane de Labrusse) #2

the correct location should be

[root@test ~]# ll /var/run/php72-php-fpm/toto.com-php72.sock
srw-rw---- 1 root apache 0 May 21 08:31 /var/run/php72-php-fpm/toto.com-php72.sock

I doubt that your nethserver-php-scl is up to date

[root@test ~]# rpm -qa nethserver-php-scl
nethserver-php-scl-1.2.3-1.ns7.sdl.x86_64

then

yum update nethserver-php-scl


(Dan) #3
[root@neth ~]# rpm -qa nethserver-php-scl
nethserver-php-scl-1.2.0-1.ns7.sdl.x86_64
[root@neth ~]# yum update nethserver-php-scl
Loaded plugins: changelog, fastestmirror, nethserver_events
sb-base                                                                                                      | 3.6 kB  00:00:00     
sb-centos-sclo-rh                                                                                            | 3.0 kB  00:00:00     
sb-centos-sclo-sclo                                                                                          | 2.9 kB  00:00:00     
sb-epel                                                                                                      | 4.7 kB  00:00:00     
sb-extras                                                                                                    | 3.4 kB  00:00:00     
sb-nethserver-base                                                                                           | 2.9 kB  00:00:00     
sb-nethserver-updates                                                                                        | 4.1 kB  00:00:00     
sb-updates                                                                                                   | 3.4 kB  00:00:00     
(1/12): sb-base/x86_64/group_gz                                                                              | 156 kB  00:00:00     
(2/12): sb-epel/x86_64/updateinfo                                                                            | 919 kB  00:00:00     
(3/12): sb-centos-sclo-sclo/x86_64/primary_db                                                                | 202 kB  00:00:00     
(4/12): sb-extras/x86_64/primary_db                                                                          | 185 kB  00:00:00     
(5/12): sb-epel/x86_64/group_gz                                                                              | 266 kB  00:00:00     
(6/12): sb-nethserver-base/x86_64/primary_db                                                                 | 241 kB  00:00:00     
(7/12): sb-nethserver-updates/x86_64/group_gz                                                                |  20 kB  00:00:00     
(8/12): sb-nethserver-updates/x86_64/primary_db                                                              | 369 kB  00:00:00     
(9/12): sb-epel/x86_64/primary_db                                                                            | 6.4 MB  00:00:01     
(10/12): sb-base/x86_64/primary_db                                                                           | 5.7 MB  00:00:01     
(11/12): sb-updates/x86_64/primary_db                                                                        | 6.9 MB  00:00:01     
(12/12): sb-centos-sclo-rh/x86_64/primary_db                                                                 | 3.2 MB  00:00:02     
Determining fastest mirrors
No packages marked for update
[root@neth ~]# 

Edit: Adding --enablerepo=stephdl allowed it to update. Looks like the subscription blocks the stephdl repo?


(Giacomo Sanchietti) #4

Yes it does, since stephdl repo is not mirrored in the infrastructure (we don’t have direct control on it).

These are the enabled repos:

    sb-base
    sb-updates
    sb-epel
    sb-extras
    sb-centos-sclo-rh
    sb-centos-sclo-sclo
    sb-nethserver-base
    sb-nethserver-updates

But you can change the configuration adding the list of enabled repositories inside /etc/nethserver/eorepo.conf.

Reference: https://github.com/NethServer/nethserver-subscription/blob/master/root/etc/e-smith/events/actions/nethserver-subscription-eorepo


(Dan) #5

That makes sense, but wasn’t an effect I’d expected.


(Giacomo Sanchietti) #6

Maybe we should add it to the manual under the Subscription chapter? What do you think?


(Dan) #7

That would probably be a good idea. Something like “Activating a subscription will enable the stable yum repositories, but will disable any other repositories you may have added. You can re-enable any other repositories by editing /etc/nethserver/eorepo.conf, but Nethserver will accept no responsibility for contents of those repositories.”


(Giacomo Sanchietti) #8

Done!

http://docs.nethserver.org/en/latest/subscription.html#product-subscription


(Dan) #9

Hmmm, that file doesn’t exist. Do I just create it and add one repo name per line?


(Giacomo Sanchietti) #10

Yes :wink:


(Stéphane de Labrusse) #11

Dan, can you reformulate the topic whoch something accurating with your issue.

Maybe, external repositories are disabled with subscription.

Feel free to correct my english, and think about the remi repository for the php-scl rpms too