stephdl
(Stéphane de Labrusse)
December 28, 2018, 4:14pm
8
not tested, just for fun, this is how you load rh-php-scl
the idea could be to use the port of my phpscl
# config show php73-php-fpm
php73-php-fpm=service
TCPPort=9073
access=
status=enabled
set it to the port 9001 and remove the port 9001 for the official rh scl
then
yum install php73-php-opcache --enablerepo=remi-safe
the template https://github.com/NethServer/nethserver-nextcloud/tree/master/root/etc/e-smith/templates/etc/opt/rh/rh-php71/php.d/20-opcache.ini
should be cp to /etc/opt/remi/php73/php.d/10-opcache.ini
(or modify accordingly the config file manually)
then
systemctl restart php73-php-fpm httpd
LayLow
(HF)
December 28, 2018, 5:17pm
9
@stephdl , any chance you can work together on this with @alep and team?
stephdl
(Stéphane de Labrusse)
December 28, 2018, 6:02pm
10
Don’t know, probably a stable repo could be better than a bleeding edge one
LayLow
(HF)
December 28, 2018, 7:07pm
11
But if a stable repo lacks the many php modules…
maja2020
(MvO)
December 29, 2018, 9:53am
12
That was too easy:
Internal Server Error
Searching for error logs, did not find any (yet).
At pointer where to find the php config file in the wiki for nextcloud.
Nextcloud 14 occ commands generates a memory_limit error to low on 128M.
maja2020
(MvO)
December 29, 2018, 12:57pm
13
Fix it. Errors where caused by opcache not enabled.
Created a custom template to point to php71-php-fpm (port 9071).
I don’t need 7.3. Copied the opcache ini file from the nextcloud installation.
Installed php71 dependancies for Nextcloud from remi-safe (compare modules from yum list installed|grep php71 or find nextcloud deps info)
cp /etc/e-smith/templates/etc/httpd/conf.d/zz_nextcloud.conf/10base /etc/e-smith/templates-custom/etc/httpd/conf.d/zz_nextcloud.conf/10base
Edit this file to match php fpm version and port (I used the 7.1 version, php71-php-fpm and port 9071)
cp /etc/opt/rh/rh-php71/php.d/20-opcache.ini /etc/opt/remi/php71/php.d/.
signal-event nethserver-nextcloud-update
systemctl restart php71-php-fpm
Try nextcloud and check error logs
tail -f /var/opt/remi/php71/log/php-fpm/error.log
tail -f /var/lib/nethserver/nextcloud/nextcloud.log
Thanks for the infos
1 Like
This is wonderful. I’m going to try it on my production machine (it’s a gateway! )
I’ve been reading up on this and I came across a couple good solutions, unrelated there’s the rh scl devtoolsets - which I installed gcc 7 to go along with my new elrepo kernel-ml so I wouldn’t have an incompatible toolchain, and I found the php equivalent here
The instructions are easy. Here’s where we start, install php 72 (scl repository enabled by default in Nethserver):
# php --version
PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51)
Copyright (c) 1997-2013 The PHP Group
]# dnf install rh-php72
Last metadata expiration check: 0:00:09 ago on Sun 30 Dec 2018 06:38:04 AM PST.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
rh-php72 x86_64 1-2.el7 centos-sclo-rh 4.3 k
Installing dependencies:
rh-php72-php-cli x86_64 7.2.10-3.el7 centos-sclo-rh 2.9 M
rh-php72-php-common x86_64 7.2.10-3.el7 centos-sclo-rh 672 k
rh-php72-php-json x86_64 7.2.10-3.el7 centos-sclo-rh 54 k
rh-php72-php-pear noarch 1:1.10.5-1.el7 centos-sclo-rh 357 k
rh-php72-php-process x86_64 7.2.10-3.el7 centos-sclo-rh 62 k
rh-php72-php-xml x86_64 7.2.10-3.el7 centos-sclo-rh 160 k
rh-php72-php-zip x86_64 7.2.10-3.el7 centos-sclo-rh 90 k
rh-php72-runtime x86_64 1-2.el7 centos-sclo-rh 1.1 M
Transaction Summary
================================================================================
Install 9 Packages
Total download size: 5.4 M
Installed size: 18 M
Is this ok [y/N]: y
Downloading Packages:
(1/9): rh-php72-1-2.el7.x86_64.rpm 20 kB/s | 4.3 kB 00:00
(2/9): rh-php72-php-pear-1.10.5-1.el7.noarch.rp 335 kB/s | 357 kB 00:01
(3/9): rh-php72-php-common-7.2.10-3.el7.x86_64. 436 kB/s | 672 kB 00:01
(4/9): rh-php72-runtime-1-2.el7.x86_64.rpm 535 kB/s | 1.1 MB 00:02
(5/9): rh-php72-php-process-7.2.10-3.el7.x86_64 117 kB/s | 62 kB 00:00
(6/9): rh-php72-php-json-7.2.10-3.el7.x86_64.rp 121 kB/s | 54 kB 00:00
(7/9): rh-php72-php-xml-7.2.10-3.el7.x86_64.rpm 198 kB/s | 160 kB 00:00
(8/9): rh-php72-php-zip-7.2.10-3.el7.x86_64.rpm 160 kB/s | 90 kB 00:00
(9/9): rh-php72-php-cli-7.2.10-3.el7.x86_64.rpm 803 kB/s | 2.9 MB 00:03
--------------------------------------------------------------------------------
Total 1.1 MB/s | 5.4 MB 00:04
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : rh-php72-runtime-1-2.el7.x86_64 1/9
Running scriptlet: rh-php72-runtime-1-2.el7.x86_64 1/9
Installing : rh-php72-php-json-7.2.10-3.el7.x86_64 2/9
Installing : rh-php72-php-zip-7.2.10-3.el7.x86_64 3/9
Installing : rh-php72-php-common-7.2.10-3.el7.x86_64 4/9
Installing : rh-php72-php-cli-7.2.10-3.el7.x86_64 5/9
Installing : rh-php72-php-process-7.2.10-3.el7.x86_64 6/9
Installing : rh-php72-php-xml-7.2.10-3.el7.x86_64 7/9
Installing : rh-php72-php-pear-1:1.10.5-1.el7.noarch 8/9
Installing : rh-php72-1-2.el7.x86_64 9/9
Verifying : rh-php72-1-2.el7.x86_64 1/9
Verifying : rh-php72-php-pear-1:1.10.5-1.el7.noarch 2/9
Verifying : rh-php72-runtime-1-2.el7.x86_64 3/9
Verifying : rh-php72-php-common-7.2.10-3.el7.x86_64 4/9
Verifying : rh-php72-php-cli-7.2.10-3.el7.x86_64 5/9
Verifying : rh-php72-php-process-7.2.10-3.el7.x86_64 6/9
Verifying : rh-php72-php-xml-7.2.10-3.el7.x86_64 7/9
Verifying : rh-php72-php-json-7.2.10-3.el7.x86_64 8/9
Verifying : rh-php72-php-zip-7.2.10-3.el7.x86_64 9/9
Installed:
rh-php72.x86_64 1-2.el7
rh-php72-php-cli.x86_64 7.2.10-3.el7
rh-php72-php-common.x86_64 7.2.10-3.el7
rh-php72-php-json.x86_64 7.2.10-3.el7
rh-php72-php-pear.noarch 1:1.10.5-1.el7
rh-php72-php-process.x86_64 7.2.10-3.el7
rh-php72-php-xml.x86_64 7.2.10-3.el7
rh-php72-php-zip.x86_64 7.2.10-3.el7
rh-php72-runtime.x86_64 1-2.el7
Complete!
Then # cd /opt/rh/rh-php72/
and run a couple scripts they leave for you:
# scl enable rh-php72 bash
# chmod +x enable && chmod +x register
# ./register && ./enable
Dir. /etc/opt
Dir. /etc/opt/rh
Dir. /etc/opt/rh/rh-php72
Dir. /etc/opt/rh/rh-php72/php.d
File /etc/opt/rh/rh-php72/php.d/20-json.ini
File /etc/opt/rh/rh-php72/php.d/20-zip.ini
File /etc/opt/rh/rh-php72/php.d/20-bz2.ini
File /etc/opt/rh/rh-php72/php.d/20-calendar.ini
File /etc/opt/rh/rh-php72/php.d/20-ctype.ini
File /etc/opt/rh/rh-php72/php.d/20-curl.ini
File /etc/opt/rh/rh-php72/php.d/20-exif.ini
File /etc/opt/rh/rh-php72/php.d/20-fileinfo.ini
File /etc/opt/rh/rh-php72/php.d/20-ftp.ini
File /etc/opt/rh/rh-php72/php.d/20-gettext.ini
File /etc/opt/rh/rh-php72/php.d/20-iconv.ini
File /etc/opt/rh/rh-php72/php.d/20-phar.ini
File /etc/opt/rh/rh-php72/php.d/20-sockets.ini
File /etc/opt/rh/rh-php72/php.d/20-tokenizer.ini
File /etc/opt/rh/rh-php72/php.d/20-posix.ini
File /etc/opt/rh/rh-php72/php.d/20-shmop.ini
File /etc/opt/rh/rh-php72/php.d/20-sysvmsg.ini
File /etc/opt/rh/rh-php72/php.d/20-sysvsem.ini
File /etc/opt/rh/rh-php72/php.d/20-sysvshm.ini
File /etc/opt/rh/rh-php72/php.d/20-dom.ini
File /etc/opt/rh/rh-php72/php.d/20-simplexml.ini
File /etc/opt/rh/rh-php72/php.d/20-xml.ini
File /etc/opt/rh/rh-php72/php.d/20-xmlwriter.ini
File /etc/opt/rh/rh-php72/php.d/20-xsl.ini
File /etc/opt/rh/rh-php72/php.d/30-wddx.ini
File /etc/opt/rh/rh-php72/php.d/30-xmlreader.ini
File /etc/opt/rh/rh-php72/php.ini
Dir. /etc/opt/rh/rh-php72/pear
File /etc/opt/rh/rh-php72/pear.conf
Dir. /usr/lib
Dir. /usr/lib/rpm
Dir. /usr/lib/rpm/macros.d
File /usr/lib/rpm/macros.d/macros.rh-php72-pear
Dir. /var/opt
Dir. /var/opt/rh
Dir. /var/opt/rh/rh-php72
Dir. /var/opt/rh/rh-php72/lib
Dir. /var/opt/rh/rh-php72/lib/php
Dir. /var/opt/rh/rh-php72/cache
Dir. /var/opt/rh/rh-php72/cache/php-pear
Dir. /var/opt/rh/rh-php72/www
Dir. /var/opt/rh/rh-php72/www/html
Check default version installed:
# php --version
PHP 7.2.10 (cli) (built: Nov 16 2018 15:24:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
success! Now to implement some of the apache scripts you have been talking about…
Edit: Doesn’t survive reboot, quick and dirty add to /etc/rc.d/rc.local
should do it:
# echo 'scl enable devtoolset-7 bash
scl enable rh-php72 bash' >> /etc/rc.d/rc.local
stephdl
(Stéphane de Labrusse)
December 30, 2018, 4:24pm
15
You could have some known issues with nethgui and php7x. Maybe you should enable php7x only for the virtualhost you need it
Is there a bug report you could point us towards, please?
stephdl
(Stéphane de Labrusse)
December 30, 2018, 4:30pm
17
No real gh issue raised, there will be a won’t fix
Just shows this message:
[64] Cannot use lexical variable $view as a parameter name
See the system log for details.
I just update the Server as a regular way, I don’t know what to do.
Ive been having issues with Email and DPI. The DPI tab errors
Summary [1] Uncaught ArgumentCountError: Too few arguments to function Nethgui\System\NethPlatform::getTableAdapter(), 1 passed in /usr/share/nethesis/NethServer/Module/Ndpi.php on line 49 and at least 2 expected in /usr/share/nethesis/Nethgui/System/NethPlatform.php:157
Stack trace:
#0 /usr/share/nethesis/NethServer/Module/Ndpi.php(49): Nethgui\System\NethPlatform->getTableAdapter(‘NethServer::Dat…’)
#1 /usr/share/nethesis/Net…
Ah, yes I just stumbled on the second one -
What’s the reason for not fixing, just curious?
stephdl
(Stéphane de Labrusse)
December 30, 2018, 5:15pm
19
good question, short answer sorry.
Efforts are going to replace nethgui with cockpit, please see in the forum the link for nethserver-cockpit
if you are interested to test in a VM
yum install nethserver-cockpit --enablerepo=nethserver-testing
then go to https://IP:9090
stephdl
(Stéphane de Labrusse)
December 30, 2018, 5:52pm
20
@AveryFreeman thanks to you there is a new rpm
yum install http://mirror.de-labrusse.fr/NethDev/nethserver-rh-php72/nethserver-rh-php72-php-fpm-1.0.0-1.ns7.noarch.rpm
https://github.com/NethServer/dev/issues/5682
the port used is 9002
# config show rh-php72-php-fpm
rh-php72-php-fpm=service
TCPPorts=9002
access=none
status=enabled
signal-event nethserver-rh-php72-php-fpm-update
stephdl
(Stéphane de Labrusse)
December 31, 2018, 9:08am
21
AveryFreeman:
Edit: Doesn’t survive reboot, quick and dirty add to /etc/rc.d/rc.local
should do it:
# echo 'scl enable devtoolset-7 bash
scl enable rh-php72 bash' >> /etc/rc.d/rc.local
Redhat made a documentation on this, this should be nicer
I will add it to our software collection modules in the wiki
Wow, this is great. Can’t wait to test it.
Do you know if there’s another ISO release planned any time soon?
tl;dr
The 7.5.1804 ISO
that I used to install had an installer that kept failing, so I wasn’t able to install any other way than the automated installer, and somehow I borked my LVM so now it’s not booting.
I’d like to modify partition strategy during installation just to be a plain XFS, EXT4 or BTRFS installation (preferably the latter so I can take snapshots easily for testing purposes).
I could submit another thread or bug report if you would like, but it’s an old ISO so I’m not sure it’s relevant anymore.
Specifically, anaconda
wouldn’t recognize any changes I made to the partition structure, I kept trying over and over and each time it would revert back to the structure existing on the SSD until finally after the 5th time the installer crashed entirely.
Btw, in case it matters, the test env I’ve been using this time is bare-metal:
Supermicro X9SCL-F BIOS v2.3 IPMI v3.3
Xeon E3-1230v2 socket 1155
32GB DDR3 1600MHz ECC UDIMM
LSI 9207-4i4e 2008 chipset SAS
300GB Intel S3500 SSD (G3)
1G NICs:
Intel 82574L and 82579LM
10G NIC:
Chelsio S320E-CXA
danb35
(Dan)
December 31, 2018, 3:52pm
23
The Nethserver 7.6 ISO was released a few weeks back; IIRC. It’s on the download page:
https://www.nethserver.org/getting-started-with-nethserver/
LayLow
(HF)
December 31, 2018, 4:39pm
24
PHP SCL is not an ISO or included in the ISO, it is a module from the stephdl repo. As @stephdl said, please see php-scl [NethServer Wiki]
stephdl
(Stéphane de Labrusse)
December 31, 2018, 4:58pm
25
Great, I’ll try it - do you know if anyone else was complaining about the installer? (I’ll do a forum search ASAP)