apache + php-fpm + postgres 12 + nextcloud 22 = open php script as file download. Why?

Hello!

I am trying to install nextcloud 22 on OpenSUSE 15.3

apache version:


httpd -v
Server version: Apache/2.4.43 (Linux/SUSE)
Server built:   2021-06-11 15:29:06.000000000 +0000

PHP version:


php -v
PHP 7.4.6 (cli) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

PHP-FPM version:


php-fpm -v
PHP 7.4.6 (fpm-fcgi) 
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

Postgresql version 12

I follow official nextcloud doc to install any times.

But, every time when I try open in browser, its opens like php script file download and no nextcloud site. I follow others blogs about nextcloud install in opensuse but, still cannot fix this. Firewall ports are open. The services do not show error on status. The configuration steps follow as documentation shows

Here the pictureThank you

Douglas

@doguibnu:

For Leap 15.3, the only tested version (OBS plus OpenQA) of Nextcloud is version 20.0.7 from the “openSUSE Backports for SLE 15 SP3” repository – <https://build.opensuse.org/package/show/openSUSE%3ABackports%3ASLE-15-SP3/nextcloud>.

By default Apache2 on SUSE does not use php-fpm so unless you’ve configured it manually, it would not work.

Install Apache PHP7 module:

zypper in -y apache2-mod_php7

Then enable the PHP7 module:

a2enmod php7

Followed by an Apache restart:

systemctl restart apache

:open_mouth:

ahhh, right!

That strange

and about this guide
and This other

I have a virtual machine with ubnutu 20.04 LTS only for test with: nextcloud 22, php-fpm 8.0, apache and postgres 12. Its works nice. But I would like to have the production machine on opensuse and follow official nextcloud doc (php 7.3 or 7.4) Opensuse 15.2 and 15.3 there are php 7.4, so I want to do work on OpenSUSE.

Thank you

Douglas

Without seeing your configuration it’s impossible to guess where the issue lies.

Does any PHP script work in your installation, even in say /srv/www/htdocs?

You could see if it parses php at all by creating a file say info.php with the contents;


<?php phpinfo(); ?>

and if it tries to download this, your entire PHP setup is somehow broken.

Now I am with Opensuse 15.2 only testing
I install apache2 and php-fpm following this

Enable and start apache2 and php-fpm. No errors in services status
I created info.php as you indicate in /srv/www/htdocs/info.php

Open firewalld ports http and https
Still open file download

I am not install postgres still!

Thanks