Cannot open PDF error in grading

Re: Cannot open PDF error in grading

by Buang M. Yulianto -
Number of replies: 0

it just exactly happened to our system, by this morning user can not open pdf annotation. what we do and finally solved this problem are:
FYI our system description contain
Linux xxx-srv.local 3.10.0-1160.49.1.el7.x86_64
PHP 7.3.33 (cli) (built: Nov 29 2021 06:22:05) ( NTS )
Moodle 3.8.3+ (Build: 20200519)
GPL Ghostscript 9.25 (2018-09-13)

precaution:
- ghostscript can not run on selinux: enforce and permissive mode so it must be disabled and reboot the server
- i do run this script without disable_function on php
#how to check selinux status
sestatus
SELinux status:                 disabled
#edit selinux config file and set to disabled
nano /etc/selinux/config
SELINUX=disabled

save and reboot
#after distribution upgrade or package update make sure doublecheck on selinux status

#check ghostscript path and make sure it is correct
go to site administration > search: ghostscript > system paths > /usr/bin/gs
#double check on directory path:
ls -l ghostscript
lrwxrwxrwx. 1 root root 11 Jan 12 09:58 /usr/bin/ghostscript -> /usr/bin/gs
#if there is no ghostscript installed do install with yum install -y ghostscript.x86_x64
#do check on test gostscript path link
#if The ghostscript path appears to be OK - please check you can see the message in the image below it means ghostscript is OK