PHP seems to die after a day or two?

NethServer Version: 7.9
Module: nethserver-webserver?

Got kind of an odd situation here. I have a web application (Meteotemplate) running in a subdirectory of my default virtual host, and it’s been working well with no changes for at least the last several months. In the last week or so, though, connections to that page have been timing out. If I run signal-event nethserver-php-update, it comes back and works just fine for a day or two–then it fails again.

Complicating things is the fact that the PHP version shown by a phpinfo(); page is 7.2.34, while the virtual hosts settings page in Cockpit says the default virtual host is using PHP 5.4, and that one can’t be changed. I don’t have any relevant custom templates in place, so I don’t know how to explain that discrepancy. But as I think further on it, I do–if I go into the old server-manager, there’s a page for a variety of PHP settings, including to set the PHP version for the default virtual host. And that’s set to 7.2. So that’s explained (though it suggests some cruft in my system that I’d be better off removing), but it doesn’t get me closer to finding an error log (see below).

Further complicating matters is the fact that that same phpinfo(); page says the error log is at /var/opt/remi/php72/log/php-fpm/www-error.log. That file exists, but there’s no content–it’s 0 bytes long.

What should my next steps be to track down what’s going on?

Edit: As I poke around a bit more, I see that the nethserver-php-scl module (and the REMI RPMs for various versions of PHP) have been deprecated in favor of self-contained management, and the official RH PHP RPMs, with Cockpit. I’d be OK, I think, with removing this module and the REMI RPMs, if someone can suggest a safe way to do it. But unless I’m missing something, there isn’t a way using Cockpit to set the default virtual host to use any PHP version other than the default of 5.4, three major releases older than the oldest supported version.

Hi Dan

Could this be an issue with leftovers from the older NethGui?

This helped me on a similiar issue:

yum remove php56-php-gd -y
yum remove php70-php-gd -y
yum remove php71-php-gd -y
yum remove php72-php-gd -y
yum remove php73-php-gd -y
yum clean all

Conflict between the older Remi and the newer versions installed by Cockpit…

My 2 cents

I don’t know if that’s it, but it seems at least plausible. But it’s unfortunate that the replacement for nethserver-php-scl (integrated in Cockpit) lacks the ability to set a different PHP version for the default virtual host. But let’s see–I went back to the old server manager, set the default virtual host to use the default (5.4) PHP version, and then run yum remove "php56*" and repeated for 70, 71, 72, and 73. That also removed nethserver-php-scl, so it should be closer to a “current” installation. Meteotemplate doesn’t require a newer PHP version, so let’s see if that’s more stable.

1 Like