Having Trouble with Nextcloud 14.04 and php7.2 on installation

Hey guys I have a (I hope) little problem with my nextcloud installation on my server.

I’m on ubuntu 18.04 LTS with apache24, mariadb, php7.2 installed.
I installed PHP with these lines:

apt install -y php7.2 php7.2-curl php7.2-gd php7.2-fpm php7.2-cli php7.2-opcache php7.2-mbstring php7.2-xml php7.2-zip php7.2-mysql php7.2-zip php7.2-xml php7.2-gd php7.2-curl php7.2-mbstring

My nextcloud_ssl.conf in /etc/apache2/sites-enabled looks like this:

IfModule mod_ssl.c>
 ServerAdmin myadmin@emailadress.com
 ServerName mydomain
 DocumentRoot /var/www/nextcloud

 <Directory /var/www/nextcloud/>
   Options +FollowSymlinks
   AllowOverride All

  <IfModule mod_dav.c>
    Dav off
  </IfModule>

   SetEnv HOME /var/www/nextcloud
   SetEnv HTTP_HOME /var/www/nextcloud
 </Directory>

 <IfModule mod_headers.c>
      Header always set Strict-Transport-Security "max-age=15768000; preload"
 </IfModule>

 SSLEngine on
 SSLCertificateFile /etc/letsencrypt/live/mydomain/fullchain.pem
 SSLCertificateKeyFile /etc/letsencrypt/live/mydomain/privkey.pem
 Include /etc/letsencrypt/options-ssl-apache.conf

Nextcloud itself is unpacked in /var/www/nextcloud

Now while trying to visit my cloud for testing I get this:

<?php /** * * Your webserver seems to be not configured to use PHP or PHP is not installed. * Please contact your administrator or follow our documentation: * https://docs.nextcloud.com/server/13/admin_manual/installation/source_installation.html I reinstalled everything now 3-4 times without any chance to get it running :frowning: Is it normal to have nearly every version of php installed after my install command at the top of this thread? Just checked out what's in /etc/php/ 5.6 7.0 7.1 7.2 7.3 Thought I only installed 7.2 with the commands on top... Thx for any help in advance

Do you have libapache2-mod-php7.2 installed?

Thank you!
That wasn’t installed, I don’t know why it wasn’t in the guide I read before :frowning: (wasn’t the official one).

Now, after systemctl restart apache2, I get a HTTP 500 error…

What’s in the apache error log?

[Mon Aug 20 11:08:41.310855 2018] [php7:error] [pid 26405] [client XXXXXXXX:58432] PHP Fatal error: Uncaught ErrorException: fopen(/var/www/nextcloud/data/nextcloud.log): failed to open stream: No such file or directory in /var/www/nextcloud/lib/private/Session/Internal.php:183\nStack trace:\n#0 [internal function]: OC\\Session\\Internal->trapError(2, 'fopen(/var/www/...', '/var/www/nextcl...', 136, Array)\n#1 /var/www/nextcloud/lib/private/Log/File.php(136): fopen('/var/www/nextcl...', 'a')\n#2 /var/www/nextcloud/lib/private/Log.php(325): OC\\Log\\File->write('PHP', 'TypeError: setc...', 3)\n#3 /var/www/nextcloud/lib/private/Log.php(218): OC\\Log->writeLog('PHP', 'TypeError: setc...', 3)\n#4 /var/www/nextcloud/lib/private/Log.php(130): OC\\Log->log(3, 'TypeError: setc...', Array)\n#5 /var/www/nextcloud/lib/private/Log/ErrorHandler.php(81): OC\\Log->critical('TypeError: setc...', Array)\n#6 [internal function]: OC\\Log\\ErrorHandler::onException(Object(TypeError))\n#7 {main}\n thrown in /var/www/nextcloud/lib/private/Session/Internal.php on line 183

[Mon Aug 20 11:08:41.311132 2018] [php7:error] [pid 26405] [client XXXXXXXX:58432] PHP Fatal error: Uncaught ErrorException: fopen(/var/www/nextcloud/data/nextcloud.log): failed to open stream: No such file or directory in /var/www/nextcloud/lib/private/Session/Internal.php:183\nStack trace:\n#0 [internal function]: OC\\Session\\Internal->trapError(2, 'fopen(/var/www/...', '/var/www/nextcl...', 136, Array)\n#1 /var/www/nextcloud/lib/private/Log/File.php(136): fopen('/var/www/nextcl...', 'a')\n#2 /var/www/nextcloud/lib/private/Log.php(325): OC\\Log\\File->write('PHP', 'Uncaught ErrorE...', 3)\n#3 /var/www/nextcloud/lib/private/Log.php(218): OC\\Log->writeLog('PHP', 'Uncaught ErrorE...', 3)\n#4 /var/www/nextcloud/lib/private/Log.php(130): OC\\Log->log(3, 'Uncaught ErrorE...', Array)\n#5 /var/www/nextcloud/lib/private/Log/ErrorHandler.php(68): OC\\Log->critical('Uncaught ErrorE...', Array)\n#6 [internal function]: OC\\Log\\ErrorHandler::onShutdown()\n#7 {main}\n thrown in /var/www/nextcloud/lib/private/Session/Internal.php on line 183

Does /var/www/nextcloud/data/nextcloud.log exist? Does /var/www/nextcloud/lib/private/Session/Internal.php exist? What is the owner/group of that files/folders? They all should be owned by www-data:www-data on a Debian/Ubuntu system.

only the Internal.php exists. There is no data folder right now within the nextcloud folder

-rw-r–r-- 1 www-data www-data 5137 Aug 16 08:50 CryptoSessionData.php
-rw-r–r-- 1 www-data www-data 3130 Aug 16 08:50 CryptoWrapper.php
-rw-r–r-- 1 www-data www-data 5301 Aug 16 08:50 Internal.php
-rw-r–r-- 1 www-data www-data 2970 Aug 16 08:50 Memory.php
-rw-r–r-- 1 www-data www-data 1803 Aug 16 08:50 Session.php

Ok I tryed something out…

deleted the whole nextcloud folder
downloaded latest_13.zip and unzipped it… i get the installation page now after doing a systemctl restart apache2 :slight_smile:

so I think it should be a problem with the new beta version that is not good for a fresh install?

If so, you should report it to the beta people. My upgrade from 13.5 to the 14 beta went smoothly, all is fine.