I think I wrecked httpd by installing php74

So I’m looking to get a program running on virtualhosts and thought the presence of php74 may help, added a repo to install it, yum updated and it was installed. However even when running signal-event nethserver-httpd-update it still didn’t appear as an option in the php list for a virtual host.

Furthermore now httpd won’t start because apparently php56 is end of life and it went ahead and removed some files after I did a bit of digging into var/log/messages:

Syntax error on line 56 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.modules.d/10-php.conf: Cannot load modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory

Tried to reinstall php56, which apparently was never fully uninstalled and it says this:
Installed package php56-3.0-1.el7.remi.x86_64 (from remi-safe) not available.

I don’t really want php56 if it’s end of life, but I suspect there’s a reason you don’t have php74 present as I do already have php8 installed and working.

Does httpd-admin and httpd absolutely need php56?

How do I remedy this as all my goodies have stopped working "nextcloud, viritualhosts, reverse proxy’s etc etc…

Thanks.

@0ctatr0n

Hi

NethServer is based on Centos 7, which itself is based on RHEL7. On RHEL7, PHP 5.6 is still the current version. RHEL does provide the PHP-SCL, which allows using several PHP versions at the same time on the same host.

You did - without informing yourself first - removed a key component of NethServer…

I can’t tell you how to fix this mess, I’m not a dev. But I’m sure you must have backups of your system… So now’s the time to test your backup/restore option… :slight_smile:
I do have daily backups of ALL 30+ systems I manage - and all have been “tested”…

My 2 cents
Andy

I’m not going to give up yet, I’ll play with it a little more.
However what is hindering me is that the http://mirror.de-labrusse.fr/ mirror seems to be down
Wonder if there’s someone I can raise this with?

@0ctatr0n

Hi

There is a procedure to reinstall all original NethServer modules/RPMs etc.

Stephdl (The owner of that repo) got locked out by his hoster this morning! :frowning:
It’s being fixed, but no idea when it’s done.

Sh*t happens! :slight_smile:

My 2 cents
Andy

No, they need PHP 5.4, but if you decided to upgrade PHP, you probably removed that too. But that should be available in the standard CentOS repos, simply called php. If you need another version than the default, Software Collections is the way to do that, but the stephdl repo is down right now:

https://wiki.nethserver.org/doku.php?id=howto:useful_commands#reinstall_all_required_packages

1 Like

Ok so I don’t know if anyone will find this interesting but I looked into the differences between the php5 and php7, it does look like quite a bit has been changed. But since I’ve exhausted all other avenues and manually backed up all vital files I thought f**k it, I’ll see what happens.

I edited /etc/httpd.conf.modules.d/10-php.conf to point to libphp7.so instead of libphp5.so.

Than when I attempted to run systemctl httpd start it threw another error and found in var/log/messages:

httpd: Syntax error on line 56 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.modules.d/10-php56-php.conf: Cannot load modules/libphp56-php5.so into server: /etc/httpd/modules/libphp56-php5.so: cannot open shared object file: No such file or directory

When I look at that line it basically asks to load everything in /etc/httpd/conf.modules.d/*.conf so I renamed 10-php56-php.conf to 10-php56-php.conf.bak and attempted to restart httpd and httpd-admin

Both started without throwing an error although /var/log/messages shows:

httpd: [Thu Feb 18 23:01:04.885836 2021] [so:warn] [pid 11528] AH01574: module php7_module is already loaded, skipping

Everything seems to work, nextcloud’s back up, the administration login is functioning, and the PHP version problem with Akaunting seems to have disappeared. However phpmyadmin which does still work, gives a bunch of errors telling me a stack of things are deprecated. I can choose to ignore them and continue using the program.

I tried uninstalling and reinstalled nethserver-phpmyadmin but I don’t think that flushed out the old config files. I suspect that If I could load phpmyadmin fresh without libphp56 it wouldn’t give these errors but I don’t know the equivalent “apt-purge” command for Centos, any Ideas?