Nextcloud installation never worked

Hi everyone, I bought a new Raspberry Pi3 to install on Nextcloud (I have one identical and it works perfectly since January).
This time I still receive Error 500 but Apache2, PHP and Nextcloud are successfully installed (diet-software, Dietpi Version 158).
I tried to delete the SD and start over again but always Error 500.
Why? How can I fix it? Thank you.


DietPi158.jpg

Anything in the error logs…

/var/log directory?

2017-11-27 11:24:56: (mod_fastcgi.c.2702) FastCGI-stderr: PHP message: PHP Fatal error: Uncaught exception ‘Doctrine\DBAL\DBALException’ with message 'Failed to connect to the database: An exception occured$
2017-11-27 11:24:56: (mod_fastcgi.c.2702) FastCGI-stderr: Stack trace:
2017-11-27 11:24:56: (mod_fastcgi.c.2702) FastCGI-stderr: #0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
2017-11-27 11:24:56: (mod_fastcgi.c.2702) FastCGI-stderr: #1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
2017-11-27 11:24:56: (mod_fastcgi.c.2702) FastCGI-stderr: #2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
2017-11-27 11:24:56: (mod_fastcgi.c.2702) FastCGI-stderr: #3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()
2017-11-27 11:24:56: (mod_fastcgi.c.2702) FastCGI-stderr: #4 /var/www/nextcloud/lib/private/DB/Connection.php(148): Doctrine\DBAL\Connection->setTransactionIsolation(2)
2017-11-27 11:24:56: (mod_fastcgi.c.2702) FastCGI-stderr: #5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Drive…

Hi,

We had some issues with NextCloud in v158, which will be resolved in v159, thanks to @MichaIng (tested):
https://github.com/Fourdee/DietPi/pull/1251#issuecomment-346888941

v159 may be a week or two away (still lots to do), in the mean time you can setup a testing branch installation (to get NextCloud working), by doing the following:
https://github.com/Fourdee/DietPi/blob/master/BRANCH_SYSTEM.md

Perhaps a quick “walkthru” to restore a busted nextcloud from v158 to V159 might help those that borked their nextcloud might be in order

Mine seems to have worked…but I also “tweaked” some things along the way so I don’t think my build is on par with a stock dietpi-software install, otherwise I would try to list the commands in order to restore nextcloud

https://dietpi.com/forum/t/nextcloud-stopped-working-after-updatting-to-v158/1641/1

There I explained a fast simple solution for the error introduced with version 158.

Thanks all, I supposed there were problems.
I await with trepidation the 159, I’m not so “professional” to candidate myself to be a tester :roll_eyes:

Edit: MichaIng your solution is very good but I formatted everything thinking it was my fault. :exclamation:

I still cannot get Nextcloud to work using Dietpi. It is a major pain. So many guides and various instructions. The documentation on Nextcloud docs is next to impossible to find what your looking for.

We need more info to help.

  • You are on DietPi v6.1? On which device?
  • Which webserver stack are you using?
  • Was this a fresh installation of DietPi and Nextcloud?
  • Check/provide your webserver, mysql and in case Nextcloud log for error messages.

I agree, the Nextcloud documentation is not too well structured to fast find the correct steps/config you need. But our installation script should do everything necessary, at least if not too much unpredictable manual adjustments were done.