Hello,
Thank you for your support.
Here are my installation info:
Nextcloud version: 19.0.1.1 (installed on user account via a PHP script from nextcloud website.)
OS: Ubuntu 20.04.1
Control Panel: Hestia CP v1.2.3
Apache version: 2.4.46
PHP version: 7.3
APCu Support: Enabled
memcache.local:none
memcache.distributed:none
memcache.locking: none
I have also installed the following requirements:
*imagemagick
*ghostscript
I am trying to activate PDF previews. Its looks like I have a multiple issues regarding cash, security and setting up the config.php file.
I tried to edit the config.php file by myself but I failed.
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html?highlight=pdf#previews
For more details check the logs below.
The output of my Nextcloud log
[core] Error: ImagickException: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408 at <<closure>>
0. /home/XXXX/web/XXXX/public_html/lib/private/Preview/Bitmap.php line 87
Imagick->readimage("/home/XXXX/w ... ]")
1. /home/XXXX/web/XXXX/public_html/lib/private/Preview/Bitmap.php line 50
OC\Preview\Bitmap->getResizedPreview("/home/XXXX/w ... f", 4096, 4096)
2. /home/XXXX/web/XXXX/public_html/lib/private/Preview/GeneratorHelper.php line 63
OC\Preview\Bitmap->getThumbnail(OC\Files\Node\File {}, 4096, 4096)
3. /home/XXXX/web/XXXX/public_html/lib/private/Preview/Generator.php line 235
OC\Preview\GeneratorHelper->getThumbnail(OC\Preview\PDF {}, OC\Files\Node\File {}, 4096, 4096)
4. /home/XXXX/web/XXXX/public_html/lib/private/Preview/Generator.php line 141
OC\Preview\Generator->getMaxPreview(OC\Files\SimpleFS\SimpleFolder {}, OC\Files\Node\File {}, "application/pdf", "")
5. /home/XXXX/web/XXXX/public_html/lib/private/Preview/Generator.php line 107
OC\Preview\Generator->generatePreviews(OC\Files\Node\File {}, [{width: 256,hei ... }], "application/pdf")
6. /home/XXXX/web/XXXX/public_html/lib/private/PreviewManager.php line 190
OC\Preview\Generator->getPreview(OC\Files\Node\File {}, 256, 256, true, "fill", null)
7. /home/XXXX/web/XXXX/public_html/apps/files/lib/Controller/ApiController.php line 128
OC\PreviewManager->getPreview(OC\Files\Node\File {}, 256, 256, true)
8. /home/XXXX/web/XXXX/public_html/lib/private/AppFramework/Http/Dispatcher.php line 170
OCA\Files\Controller\ApiController->getThumbnail(256, 256, OC\Files\Node\File {})
9. /home/XXXX/web/XXXX/public_html/lib/private/AppFramework/Http/Dispatcher.php line 100
OC\AppFramework\Http\Dispatcher->executeController(OCA\Files\Controller\ApiController {}, "getThumbnail")
10. /home/XXXX/web/XXXX/public_html/lib/private/AppFramework/App.php line 137
OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files\Controller\ApiController {}, "getThumbnail")
11. /home/XXXX/web/XXXX/public_html/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
OC\AppFramework\App::main("APIController", "getThumbnail", OC\AppFramework\ ... {}, {x: "256",y: "25 ... "})
12. <<closure>>
OC\AppFramework\Routing\RouteActionHandler->__invoke({x: "256",y: "25 ... "})
13. /home/XXXX/web/XXXX/public_html/lib/private/Route/Router.php line 297
call_user_func(OC\AppFramework\ ... {}, {x: "256",y: "25 ... "})
14. /home/XXXX/web/XXXX/public_html/lib/base.php line 1007
OC\Route\Router->match("/apps/files/api ... f")
15. /home/XXXX/web/XXXX/public_html/index.php line 37
OC::handleRequest()
GET /index.php/apps/files/api/v1/thumbnail/256/256/1_5118352478428987514.pdf
from 78.95.238.102 by XXXX at 2020-08-20T20:54:30+00:00
The output of my config.php:
<?php
$CONFIG = array (
'instanceid' => 'XXXX',
'passwordsalt' => 'XXXX',
'secret' => 'XXXX',
'trusted_domains' =>
array (
0 => 'XXXX.com',
),
'datadirectory' => '/home/XXXX/web/XXXX.com/public_html/data',
'dbtype' => 'mysql',
'version' => '19.0.1.1',
'overwrite.cli.url' => 'https://XXXX.com',
'dbname' => 'XXXX',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'XXXX',
'dbpassword' => 'XXXX',
'installed' => true,
);
Can you kindly assist me fixing the issue and getting the PDF previews to work.
Best regards,
Nasser