imagemagick + ghostscript

Обсуждение установки и настройки поддерживаемых вебсерверов, а также работы с ними.
Goryanin
Сообщения: 18
Зарегистрирован: Пт май 03, 2019 8:31 am

Re: imagemagick + ghostscript

Сообщение Goryanin » Вс май 08, 2022 4:42 am

[root@vmi285238 ~]# rpm -qa libpng ghostscript ImageMagick\*|sort
ghostscript-9.25-5.el7.x86_64
ImageMagick-6.9.10.68-6.el7_9.x86_64
libpng-1.5.13-7.el7_2.x86_64
[root@vmi285238 ~]# yum list instlled libpng ghostscript ImageMagick\*|sort
788 packages excluded due to repository priority protections
Available Packages
* base: mirror.23m.com
Excluding 1 update due to versionlock (use "yum versionlock status" to show it)
Excluding mirror: mirror.fra10.de.leaseweb.net
Excluding mirror: mirror.fra10.de.leaseweb.net
* extras: mirror.23m.com
ghostscript.i686 9.25-5.el7 base ghostscript.x86_64 9.25-5.el7 @base ImageMagick-c++-devel.i686 6.9.10.68-6.el7_9 updates ImageMagick-c++-devel.x86_64 6.9.10.68-6.el7_9 updates ImageMagick-c++.i686 6.9.10.68-6.el7_9 updates ImageMagick-c++.x86_64 6.9.10.68-6.el7_9 updates ImageMagick-devel.i686 6.9.10.68-6.el7_9 updates ImageMagick-devel.x86_64 6.9.10.68-6.el7_9 updates ImageMagick-doc.x86_64 6.9.10.68-6.el7_9 updates ImageMagick.i686 6.9.10.68-6.el7_9 updates ImageMagick-perl.x86_64 6.9.10.68-6.el7_9 updates ImageMagick.x86_64 6.9.10.68-6.el7_9 @updates Installed Packages
libpng.i686 2:1.5.13-8.el7 base libpng.x86_64 2:1.5.13-7.el7_2 @anacondalibpng.x86_64 2:1.5.13-8.el7 base Loaded plugins: fastestmirror, priorities, versionlock
Loading mirror speeds from cached hostfile
* updates: mirror.imt-systems.com

Аватара пользователя
sbury
Сообщения: 1344
Зарегистрирован: Вт фев 06, 2018 7:51 am

Re: imagemagick + ghostscript

Сообщение sbury » Вс май 08, 2022 6:04 am

Installed Packages
libpng.i686 2:1.5.13-8.el7 base libpng.x86_64 2:1.5.13-7.el7_2 @anacondalibpng.x86_64 2:1.5.13-8.el7 base Loaded plugins: fastestmirror, priorities, versionlock
не очень понятно почему у вас libpng двух версии. 13-7 и 13-8. Попробуйте удалить обе и поставить заново, предварительно обновив онформацию о репозитарии

попробуйте выполнить этот тест хронология команд и отзывы ниже,

Код: Выделить всё

[root@a202 ~]#
[root@a202 ~]#  wget -O tiger.eps 'http://git.ghostscript.com/?p=ghostpdl.git;a=blob_plain;f=examples/tiger.eps;hb=HEAD'
--2022-05-08 02:25:23--  http://git.ghostscript.com/?p=ghostpdl.git;a=blob_plain;f=examples/tiger.eps;hb=HEAD
Resolving git.ghostscript.com (git.ghostscript.com)... 184.73.189.105
Connecting to git.ghostscript.com (git.ghostscript.com)|184.73.189.105|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/postscript]
Saving to: Б─≤tiger.epsБ─≥

    [ <=>                                                                                                                           ] 78,687       437KB/s   in 0.2s

2022-05-08 02:25:24 (437 KB/s) - Б─≤tiger.epsБ─≥ saved [78687]

[root@a202 ~]# type convert gs
convert is /usr/bin/convert
gs is /usr/bin/gs
[root@a202 ~]# convert tiger.eps tiger.pdf
[root@a202 ~]# echo $?
0
[root@a202 ~]#
Выполните как из под рута , так и под пользователем, которому принадлежит пхп код

Если у вас пользователь в окружении джаил убедитесь в наличии в его домашнем каталоге наличие следующих ресурсов

Код: Выделить всё

/home/<USER>/usr/bin/convert
/home/<USER>/usr/bin/gs
/home/<USER>/etc/ImageMagick-6/*
/home/<USER>/usr/share/ImageMagick-6/*
/home/<USER>/usr/share/ghostscript/*
Если что-то отсутствует, добавьте в настройках джаил панели по адресу
:8002/index.php?do=hostacc&subaction=jail

и перестройте скелетон и окружеие джаил
Используйте такой же механизм проверки работоспособности пользователя в окружении джаил. Вот какая должна быть отработка у пользователя в окружении джаил

Код: Выделить всё

[sasha@a202 ~]$ wget -O tiger.eps 'http://git.ghostscript.com/?p=ghostpdl.git;a=blob_plain;f=examples/tiger.eps;hb=HEAD'
--2022-05-08 05:12:43--  http://git.ghostscript.com/?p=ghostpdl.git;a=blob_plain;f=examples/tiger.eps;hb=HEAD
Resolving git.ghostscript.com (git.ghostscript.com)... 184.73.189.105
Connecting to git.ghostscript.com (git.ghostscript.com)|184.73.189.105|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/postscript]
Saving to: 'tiger.eps'

    [ <=>                                                                                                                           ] 78,687       463KB/s   in 0.2s

2022-05-08 05:12:45 (463 KB/s) - 'tiger.eps' saved [78687]

[sasha@a202 ~]$  type convert gs
convert is hashed (/usr/bin/convert)
gs is /usr/bin/gs
[sasha@a202 ~]$ convert tiger.eps tiger.pdf
[sasha@a202 ~]$ echo $?
0
[sasha@a202 ~]$

Ответить