The Basics
Summary of the issue you are facing:
- I wanted to enable video previews, so i tried to edit the config.php file. Every entry I add, causes an Internal Server Error’ through the Browser.
- I also tried to create a seperate preview.config.php file which caused the same problem.
- Removing every entry solves the problem and Nextcloud is accessible through the browser again.
Steps to replicate it (hint: details matter!):
- Being Logged in as root@nextcloudpi on Proxmox Webinterface
- cd …
- sudo nano var/www/nextcloud/config/config.php
- Full config.php document appears with various informations
- Adding (for easy summary here) a single line like: ‘preview_ffmpeg_path’ => ‘/usr/bin/ffmpeg’ (in between or at the end of the lines doesn’t change the problem)
- STRG+X
- Y
- Reboot
- Log-in through proxmox works
- But not over the Browser to the nextcloud interface
I am using this tutorial which was recommended here:
https://www.allerstorfer.at/nextcloud-install-preview-generator/
trying :
sudo -u www-data php /var/www/nextcloud/occ preview:generate-all -vvv
gives errors like
ParseError: syntax error, unexpected single-quoted string “enable_previews”, expecting “)” in /var/www/nextcloud/config/config.php:55
Log entries
Sorry. I am a newbie. Don’t know which logs are needed
My planed entries are:
‘preview_ffmpeg_path’ => ‘/usr/bin/ffmpeg’
‘enable_previews’ => true,
‘enabledPreviewProviders’ =>
array (
0 => ‘OC\Preview\TXT’,
1 => ‘OC\Preview\MarkDown’,
2 => ‘OC\Preview\OpenDocument’,
3 => ‘OC\Preview\PDF’,
4 => ‘OC\Preview\MSOffice2003’,
5 => ‘OC\Preview\MSOfficeDoc’,
6 => ‘OC\Preview\Image’,
7 => ‘OC\Preview\Photoshop’,
8 => ‘OC\Preview\TIFF’,
9 => ‘OC\Preview\SVG’,
10 => ‘OC\Preview\Font’,
11 => ‘OC\Preview\MP3’,
12 => ‘OC\Preview\Movie’,
13 => ‘OC\Preview\MKV’,
14 => ‘OC\Preview\MP4’,
15 => ‘OC\Preview\AVI’,
),
);