Deleted opt/ folder with file librh-php72-php7.so

I accidentally deleted my opt/ folder where the file /opt/rh/httpd24/root/etc/httpd/modules/librh-php72-php7.so. is located. However after reinstalling php72 I could not manage no restore this file and nextcloud won’t run.

Do you use RHEL or CentOS? If yes read:

https://docs.nextcloud.com/server/15/admin_manual/installation/php_72_installation.html
(repeat the installation guide)

If not post your operation system and version. Thanks.

yes I did the reinstall, it doesn’t help

Ok. Please post more details. Are you use RHEL or CentOS and which version?

Have you “Symlink the PHP 7.2 Apache modules into place” ?

Sorry. I use Debian GNU/Linux with the standard php-versions from repository. No problems here.

i am using centos7, symlink are working, it the file which is missing

Please “cut-and-paste” the errors and logs. Thanks.

 apachectl configtest
httpd: Syntax error on line 56 of /etc/httpd/conf/httpd.conf: Syntax error on line 9 of /etc/httpd/conf.modules.d/15-rh-php72-php.conf: Cannot load modules/librh-php72-php7.so into server: /etc/httpd/modules/librh-php72-php7.so: cannot open shared object file: No such file or directory
/etc/httpd/modules/librh-php72-php7.so -> /opt/rh/httpd24/root/etc/httpd/modules/librh-php72-php7.so
ls -l /opt/rh/httpd24/root/etc/httpd/

insgesamt 0
drwxrwxrwx. 2 root root 39 27. Aug 10:33 conf.d
drwxrwxrwx. 2 root root 42 27. Aug 10:33 conf.modules.d

There is no folder module

Sorry. I am not a RHEL or CentOS user.

Here you can see the files are in package “rh-php72” (scroll to Files):

https://centos.pkgs.org/7/centos-sclo-rh-testing-x86_64/rh-php72-php-7.2.10-3.el7.x86_64.rpm.html

Perhaps you can reinstall the packages (read https://doc.owncloud.com/server/admin_manual/maintenance/upgrading/upgrade_php.html#upgrade-php-to-version-7-2 ) or unzip/decompress the rpm-file and manually copy them back to /opt/… Sorry i am also not a rpm-expert.

Ok I installed Centos on a virtual drive, and installed php72 there, from there I coul copy the modules directory in my opt/ folder. I really don’t get it why this is not working erasing php72 and the reinstalling

Sorry. I do not know it, too. 1h ago i thought no linux operation system would install package files to /opt . Because of “Testing” and not the normal version of php? I do not know it.

But here my hint: make backups including /opt . I never backuped /opt on Debian GNU/Linux because there are no from my package system installed packages.

1 Like

Yes I will, or better not working in su mode anymore

1 Like