PHP 73 (remi) log level - Warings spam logfile - server disc space runs full

UPDATE:
NethServer Version: 7.9.2009
Module: Stephdl Repo (remi) enabled for all Webpages php-fpm 73

Hi together,

my server space constantly runs full due to warning. There is a faulty PHP coding with in my wordpress page, which is running fine.The page runs under PHP 73 (remi).

[root@nethserver ~]# tail -f /var/opt/rh/rh-php73/log/php-fpm/error-avvp.de.log
[22-Jul-2021 09:59:50 UTC] PHP Warning:  next() expects parameter 1 to be array, null given in /var/lib/nethserver/vhost/avvp.de/wp-includes/class-wp-hook.php on line 308
[22-Jul-2021 09:59:50 UTC] PHP Warning:  current() expects parameter 1 to be array, null given in /var/lib/nethserver/vhost/avvp.de/wp-includes/class-wp-hook.php on line 291
[22-Jul-2021 09:59:50 UTC] PHP Warning:  Invalid argument supplied for foreach() in /var/lib/nethserver/vhost/avvp.de/wp-includes/class-wp-hook.php on line 294

This slows down the server. This fills up the diskspace (dozends of GB within minutes!) until the server is not usable any more. I have to manually truncate the file:

[root@nethserver ~]#  truncate --size 500KB /var/opt/rh/rh-php73/log/php-fpm/*.log

So far so good (bad). Until the problem with the code of the page, wordpress-plugin or whatever is fixed, I want to alter the log level in php-fpm.conf

[root@nethserver ~]# vim  /etc/opt/rh/rh-php73/php-fpm.conf +44
; Log level
; Possible Values: alert, error, warning, notice, debug
; Default Value: notice
log_level = error

systemctl restart php73-php-fpm
service httpd restart

But this has no effect. The warnings are still there. Am I missing something? I know the problem sits between the screen and the back of my chair :slight_smile:

Thank you in advance.

Cheers Axel

@Axel_Pospischil

Hi

It would be nice to know at what version your server is running? The latest 7.9 or an older version…

As a Tip: In the newest version of NethServer, 7.9 incl. updates, PHP 73 (remi) is considered deprecated - NethServer now includes the PHP from Epel, if I’m not mistaken. The functionality to choose PHP versions is available under vhosts…

Hope this helps…

My 2 cents
Andy

Updated thread - the usage of standard repos whould be fine …

THX

1 Like

I would give uninstalling remi-repo a try, but how to revert?

https://wiki.nethserver.org/doku.php?id=php-scl just gives information about installation (which I once used to install it).

UPDATE: found it via cli command (nethserver manager interface does NOT work):

[root@nethserver ~]# yum remove nethserver-stephd
#                    ############################
Loaded plugins: changelog, fastestmirror, nethserver_events
Resolving Dependencies
--> Running transaction check
---> Package nethserver-stephdl.noarch 0:1.1.7-1.ns7.sdl will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================
 Package                               Arch                      Version                             Repository                   Size
=================================================================
Removing:
 nethserver-stephdl                    noarch                    1.1.7-1.ns7.sdl                     @stephdl                     74 k

Transaction Summary
=================================================================
Remove  1 Package

Installed size: 74 k
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : nethserver-stephdl-1.1.7-1.ns7.sdl.noarch                                                                           1/1 
  Verifying  : nethserver-stephdl-1.1.7-1.ns7.sdl.noarch                                                                           1/1 

… takes a lot of time … updating in a few miniutes …

Cheers.

1 Like

php73 of remi or rh-php73 of scl are the same, if the error is logged by one you should have the same issue with the others.

For what I read you only removed my repository, not the remi one

I think I need to obsolete and remove the rpm of php-scl of my repository :confused:

Which WordPress version?
Here are some similar cases, but from quite a while (you might find something useful):
https://core.trac.wordpress.org/ticket/39338


1 Like

Thank you Marc. I look into it and report …

stephdlStéphane de Labrusse Dev Team - 11h

php73 of remi or rh-php73 of scl are the same, if the error is logged by one you should have the same issue with the others.

For what I read you only removed my repository, not the remi one

I think I need to obsolete and remove the rpm of php-scl of my repository

Hi Stéphane, yes this is correct. I had no time yesterday to finish the task. Them rpm’s will not be automatically removed. I have to dig into this which packages I have to remove. The wiki is not that clear about it.
Until now I did not have any problems.

Thanks for you reply.
Axel

1 Like

Again: server full, spammed logfiles … :crazy_face:
Nethserver 7.9.2009

What I did:

  • switched to old (!) server interface https://my_server:980
  • turned on PHP 7.4 (was 7.3) for my website

Problem gone :grinning:

Really?

PHP 7.4 is not available on the standard webmanagers interface (port 9090)? → Appliocations → Webserver → Settings → VirtualHosts
grafik

Old manager (port 980) → Manage → Virtual hosts
grafik

Drove me nuts this one.

Cheers
Axel

Read the wiki of nethserver in the relevant module page. It is normal

Read the wiki of nethserver in the relevant module page. It is normal

Hi Stéphane,

thanks for the comment - but forgive me and due to all respect, but “normal” is if a system works as “expected”, and not with “hidden features”. This is an absolute no go. PHP is THE platform for all modern websites (e.g. wordpress) or webservices. This is really a showstopper.

Nevertheless: overall I am very pleased with Nethserver. It is very stable and works like a charm :slight_smile: Very good work!

Hi Axel, may I disagree with you?
If you enjoy and need that much PHP, you should be well skilled for install, maintain, update, assess, secure and connect that framework. A this should be a nice asset to monetize in your job.

Or…
As many other users like me, you should only need some PHP of the right version, “working” and “not being holed like gruyere or emmenthaler”, with a common sense for avoiding nuclear catastrophes, like someone exploiting the installed PHP application on your server and exposing to the risk of a contract termination from the hosting provider or the ISP. They don’t like being adverdised as “spam source”.

PHP is one of the most used web application framework nowayads, not the only one. :slight_smile:

cat << EOT

@pike : sorry, cannot follow and agree to this off topic argument :slight_smile: We don’t talk about web development here. We are talking about usability.

I personally think the administrators point of view “you should know what you do and you are responsible for what you do, get yourself a managed service” is not very helpful at all - sorry. Clear words.

Fact is: switch the php version without hazzle to ensure the most effective security level is not possible without a “hidden” feature. I use nethserver - like others do - because I trust it gives me the best framework to do exact these tasks. I used other groupware: Zentyal, Univention, … Nethserver is the best after years of practical work when it comes to everyday tasks, features, configurability, stable update-pipeline, backup and usability.

That said: usability is one of the strength of Nethserver. If the fancy new webgui is in parts “beta software” or “not complete”, it should be clearly defined as such at the entry page or/and the modules subgui (e.g. for virtual servers) should give a warning. This should not be hidden in a “manual page” somewhere. My opinion.
Besides: I know what RTFM means and normally do it :-)).

I am dealing with websites since decades. In private as for friends and within a non profit organisation (and no, we don’t have the money to pay for professional service!). And it is not my bread and butter business (but I studied Informatic science). I am not a PHP lover. And yes, I know other frameworks outside. I think, you can get realworld assessment which level PHP has: https://fortyseven47.com/blog/lang-web-app-development/, https://en.wikipedia.org/wiki/Programming_languages_used_in_most_popular_websites, dot dot dot

I am pragmatic, take and use what circumstances need. That’s, why I use Nethserver, actual version of PHP and a framework like Wordpress with a (comercial/bought) theme. If this is not enough for a simple web presenve than “… we really have a big, big problem.” You can agree or don’t :slight_smile: I will not change my mind, I too old for such discussions, forgive me :slight_smile:

EOT (END OFF-TOPIC)

1 Like

https://wiki.nethserver.org/doku.php?id=php-scl

You can read in the above page

This module provides a support to install php-scl from remi repository inside **nethgui** ,remi repository is the laboratory before to send the rpm to the software collection of redhat.

Actually the virtualhosts panel of cockpit allows to switch the php version too, it uses the rh-php from the software collection of redhat. It is the stable version.

php73 of remi !== rh-php73 of redhat

The two uses different TCP port, the two uses different unix socket, the two are different software.

This module won't be updated the official way now is cockpit with the virtualhosts panel

So nethserver-php-scl is a first work on php scl that use remi php scl. It is a module non official, not anymore maintained

The cockpit page uses rh-php scl but php74 is not available, the project has stopped the support after php73. We do offer php80 from remi

@stephdl : Thanks for detailed and helpful explanation :+1:

1 Like

We always try to listen the needs of community but sometimes it is not possible to fix an issue, choices must been made.

Sorry if my first answer was short.