Page 2 of 4

Re: PDF to JPG not working from php front end

Posted: 2014-12-08T15:52:58-07:00
by snibgo
fmw42 wrote:If you see gs under delegates from convert -version or convert -list configure, then Imagemagick should be seeing it.
"convert -list configure" shows the contents of delegates.xml. It doesn't check that each program is available.

This can be easily shown: put an entry in delegates.xml that refers to a program that doesn't exist.

Re: PDF to JPG not working from php front end

Posted: 2014-12-08T17:00:34-07:00
by danfar
if I run, i see this which clearly shows i have gs in there
convert -list configure | grep DELEGATES => DELEGATES bzlib djvu freetype gs jpeg jng jp2 lcms png tiff x11 xml zlib

Re: PDF to JPG not working from php front end

Posted: 2014-12-08T18:06:39-07:00
by fmw42
User snibgo, says that it is only showing delegates listed in delegates.xml and not those that IM actually finds installed. So if you have a current version of IM use the delegates list from convert -version as a list of what IM recognizes as installed. Older versions of IM will not list the delegates when you do convert -version.

I still believe it is some configuration of your OS or PHP that does not let Imagick (not Imagemagick) know you have GS installed or that your PHP Imagick is using a different installation of Imagemagick. Check to be sure phpinfo.php shows the same version of Imagemagick as you think you are using. There could be different versions of Imagemagick installed in different locations.

You can also try at the terminal or via PHP exec()

type -a convert

and see if that shows more than one Imagemagick.

Re: PDF to JPG not working from php front end

Posted: 2014-12-08T18:25:54-07:00
by snibgo
My comments apply only to current IM. I have no idea about v6.5.4-7.
danfar wrote:<?php
exec("/usr/bin/convert test.pdf jastest123.jpg");
?>
If PHP can't find convert by itself, then how will it find Ghostscript? I suggest (again) a PHP configuration problem.

Re: PDF to JPG not working from php front end

Posted: 2014-12-08T19:43:44-07:00
by danfar
this is what the phpinfo file shows - ImageMagick 6.5.4-7 2014-02-10 Q16 OpenMP http://www.imagemagick.org and its the same ver.

i have imagemagick and imagick both in different folders is these two different things?

can I hire you to fix this for me
thanks

Re: PDF to JPG not working from php front end

Posted: 2014-12-08T20:15:28-07:00
by fmw42
Imagick and Imagemagick are two different things. If you use PHP and exec(), you are not using Imagick and this topic is posted to the wrong forum. Which are you trying to use?

I am not a PHP expert. So you might have to find some one else.

Does phpinfo show Ghostscript?

What do you get from PHP when you run exec with the following?

exec("type -a convert");

Re: PDF to JPG not working from php front end

Posted: 2014-12-08T20:20:51-07:00
by fmw42
You say this works in the terminal

convert test.pdf test123.jpg

But does this work

/usr/bin/convert test.pdf test123.jpg

In your terminal type

type -a convert

and see if you have more than one version of IM

Re: PDF to JPG not working from php front end

Posted: 2014-12-09T10:05:10-07:00
by danfar
my phpinfo doesnt show ghostscript - is it supposed to?
---
when i do <?php
exec("type -a convert");
?>
i get a blank page
-----
when i do
In your terminal type
type -a convert
I get /usr/bin/convert
and see if you have more than one version of IM - No I dont see any more ver.
----
But does this work - YES it works
/usr/bin/convert test.pdf test123.jpg
------

Re: PDF to JPG not working from php front end

Posted: 2014-12-09T10:55:41-07:00
by fmw42
I am at a loss to know what to tell you. Have you discussed this with your ISP?

Re: PDF to JPG not working from php front end

Posted: 2014-12-09T11:42:32-07:00
by danfar
its digitalocean they dont support any questions

Re: PDF to JPG not working from php front end

Posted: 2014-12-09T12:59:13-07:00
by Bonzo
Is there anything tying you to digitalocean as there are plenty of other hosts around. But saying that it can be hard to find one that is running an up to date version of imagemagick.

Re: PDF to JPG not working from php front end

Posted: 2014-12-09T13:04:32-07:00
by danfar
cheap / performance - but i have ssh so can Install whatever i want - whats the best way to delete the current and install fresh with latest products

ssh command line would be good ( that I can just type and it gets it from URL) im not comfortable with downloading and then unzipping stuff

thanks

Re: PDF to JPG not working from php front end

Posted: 2014-12-09T13:15:11-07:00
by Bonzo
I always get my hosts to do it now as in the past I had to install on three different servers and I had a success rate of 33.3%

Re: PDF to JPG not working from php front end

Posted: 2014-12-09T18:34:20-07:00
by danfar
nothing? anyone?

also should the phpinfo file have ghostscript in it?

Re: PDF to JPG not working from php front end

Posted: 2014-12-09T19:36:52-07:00
by snibgo
Within PHP, what is the value of $PATH? Is Ghostscript on the path? Can other binaries be run from within PHP?