My phpinfo does not show IM nor ghostscript, yet I can run IM just fine.phpinfo file have ghostscript in it?
PDF to JPG not working from php front end
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: PDF to JPG not working from php front end
Re: PDF to JPG not working from php front end
how can I check that - thanks
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: PDF to JPG not working from php front end
I am not sure what you are askingdanfar wrote:how can I check that - thanks
Re: PDF to JPG not working from php front end
"Within PHP, what is the value of $PATH? Is Ghostscript on the path? Can other binaries be run from within PHP?"
how can I check that
how can I check that
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: PDF to JPG not working from php front end
try
exec("echo $path");
I do not know the answers.
Try running gs from the command line. If that works, then try the same command in exec(). You may need to provide the full path to gs when in exec().
exec("echo $path");
I do not know the answers.
Try running gs from the command line. If that works, then try the same command in exec(). You may need to provide the full path to gs when in exec().
Re: PDF to JPG not working from php front end
if you put gs on command it says
Ghostscript 8.70 Cannot open X display `(null)'.
**** Unable to open the initial device, quitting.
same on /usr/bin/gs
Ghostscript 8.70 Cannot open X display `(null)'.
**** Unable to open the initial device, quitting.
same on /usr/bin/gs
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: PDF to JPG not working from php front end
Sorry I really do not know that much about Ghostscript and don't know why it needs X display. Perhaps you have a bad install. My only thought would be to upgrade IM and Ghostscript.
Re: PDF to JPG not working from php front end
I ended up reinstalling everything from scratch - now I can conver pdf to jpf from gs exec frontend but imagickmagick doesnt convert
i dont see gs in delgates could that be the issue?
DELEGATES bzlib mpeg fontconfig freetype jng jpeg lcms pango png ps tiff x xml zlib
---------
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib mpeg fontconfig freetype jng jpeg lcms pango png ps tiff x xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-jemalloc=no --with-u mem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-gvc=no --with-rsvg=no --with -wmf=no --with-perl=no
DOCUMENTATION_PATH /usr/local/share/doc/ImageMagick-6
EXEC-PREFIX /usr/local
EXECUTABLE_PATH /usr/local/bin
FEATURES DPC OpenMP
FILTER_PATH /usr/local/lib/ImageMagick-6.9.0/modules-Q16/filters
HOST x86_64-unknown-linux-gnu
INCLUDE_PATH /usr/local/include/ImageMagick-6
LDFLAGS -L/usr/local/lib
LIB_VERSION 0x690
LIB_VERSION_NUMBER 6,9,0,0
LIBRARY_PATH /usr/local/lib/ImageMagick-6.9.0
LIBS -llcms -ltiff -lfreetype -ljpeg -lpng12 -lfontconfig -lXext -lXt -lSM -lICE -lX1 1 -lbz2 -pthread -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lxml2 -lz -lm -lgomp
NAME ImageMagick
PCFLAGS -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2014-12-11
SHARE_PATH /usr/local/share/ImageMagick-6
SHAREARCH_PATH /usr/local/lib/ImageMagick-6.9.0/config-Q16
SVN_REVISION 17068
TARGET_CPU x86_64
TARGET_OS linux-gnu
TARGET_VENDOR unknown
VERSION 6.9.0
WEBSITE http://www.imagemagick.org
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
FEATURES OpenMP
NAME ImageMagick
i dont see gs in delgates could that be the issue?
DELEGATES bzlib mpeg fontconfig freetype jng jpeg lcms pango png ps tiff x xml zlib
---------
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib mpeg fontconfig freetype jng jpeg lcms pango png ps tiff x xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-jemalloc=no --with-u mem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-gvc=no --with-rsvg=no --with -wmf=no --with-perl=no
DOCUMENTATION_PATH /usr/local/share/doc/ImageMagick-6
EXEC-PREFIX /usr/local
EXECUTABLE_PATH /usr/local/bin
FEATURES DPC OpenMP
FILTER_PATH /usr/local/lib/ImageMagick-6.9.0/modules-Q16/filters
HOST x86_64-unknown-linux-gnu
INCLUDE_PATH /usr/local/include/ImageMagick-6
LDFLAGS -L/usr/local/lib
LIB_VERSION 0x690
LIB_VERSION_NUMBER 6,9,0,0
LIBRARY_PATH /usr/local/lib/ImageMagick-6.9.0
LIBS -llcms -ltiff -lfreetype -ljpeg -lpng12 -lfontconfig -lXext -lXt -lSM -lICE -lX1 1 -lbz2 -pthread -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lxml2 -lz -lm -lgomp
NAME ImageMagick
PCFLAGS -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2014-12-11
SHARE_PATH /usr/local/share/ImageMagick-6
SHAREARCH_PATH /usr/local/lib/ImageMagick-6.9.0/config-Q16
SVN_REVISION 17068
TARGET_CPU x86_64
TARGET_OS linux-gnu
TARGET_VENDOR unknown
VERSION 6.9.0
WEBSITE http://www.imagemagick.org
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
FEATURES OpenMP
NAME ImageMagick
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: PDF to JPG not working from php front end
what do you get from
convert -version
where it shows delegates.
convert -version
where it shows delegates.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: PDF to JPG not working from php front end
You told it no gslib. Try installing by adding --with-gslib=yes and --with-gs-font-dir=/fullpath2/ghostscript/fonts/ to your ./configure.DELEGATES bzlib mpeg fontconfig freetype jng jpeg lcms pango png ps tiff x xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-jemalloc=no --with-u mem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-gvc=no --with-rsvg=no --with -wmf=no --with-perl=no
Re: PDF to JPG not working from php front end
Now:
DELEGATES bzlib mpeg fontconfig freetype gslib jng jpeg lcms pango png ps tiff x xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-jemalloc= no --with-umem=no --with-autotrace=no --with-fontpath= --with-gvc=no --with-rsvg=no --with-wmf=no --with-perl=no
DOCUMENTATION_PATH /usr/local/share/doc/ImageMagick-6
EXEC-PREFIX /usr/local
EXECUTABLE_PATH /usr/local/bin
FEATURES DPC OpenMP
FILTER_PATH /usr/local/lib/ImageMagick-6.9.0/modules-Q16/filters
HOST x86_64-unknown-linux-gnu
INCLUDE_PATH /usr/local/include/ImageMagick-6
LDFLAGS -L/usr/local/lib
LIB_VERSION 0x690
LIB_VERSION_NUMBER 6,9,0,0
LIBRARY_PATH /usr/local/lib/ImageMagick-6.9.0
LIBS -llcms -ltiff -lfreetype -ljpeg -lgs -lpng12 -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -pthread -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lxml2 -lz -lm -lgomp
NAME ImageMagick
PCFLAGS -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2014-12-12
SHARE_PATH /usr/local/share/ImageMagick-6
SHAREARCH_PATH /usr/local/lib/ImageMagick-6.9.0/config-Q16
SVN_REVISION 17068
TARGET_CPU x86_64
TARGET_OS linux-gnu
TARGET_VENDOR unknown
VERSION 6.9.0
WEBSITE http://www.imagemagick.org
Path: [built-in]
DELEGATES bzlib mpeg fontconfig freetype gslib jng jpeg lcms pango png ps tiff x xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-jemalloc= no --with-umem=no --with-autotrace=no --with-fontpath= --with-gvc=no --with-rsvg=no --with-wmf=no --with-perl=no
DOCUMENTATION_PATH /usr/local/share/doc/ImageMagick-6
EXEC-PREFIX /usr/local
EXECUTABLE_PATH /usr/local/bin
FEATURES DPC OpenMP
FILTER_PATH /usr/local/lib/ImageMagick-6.9.0/modules-Q16/filters
HOST x86_64-unknown-linux-gnu
INCLUDE_PATH /usr/local/include/ImageMagick-6
LDFLAGS -L/usr/local/lib
LIB_VERSION 0x690
LIB_VERSION_NUMBER 6,9,0,0
LIBRARY_PATH /usr/local/lib/ImageMagick-6.9.0
LIBS -llcms -ltiff -lfreetype -ljpeg -lgs -lpng12 -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -pthread -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lxml2 -lz -lm -lgomp
NAME ImageMagick
PCFLAGS -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2014-12-12
SHARE_PATH /usr/local/share/ImageMagick-6
SHAREARCH_PATH /usr/local/lib/ImageMagick-6.9.0/config-Q16
SVN_REVISION 17068
TARGET_CPU x86_64
TARGET_OS linux-gnu
TARGET_VENDOR unknown
VERSION 6.9.0
WEBSITE http://www.imagemagick.org
Path: [built-in]
Re: PDF to JPG not working from php front end
I can call from the front it shows this
Version return code is 0
Version: ImageMagick 6.9.0-0 Q16 x86_64 2014-12-12 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates (built-in): bzlib fontconfig freetype gslib jng jpeg lcms pangocairo png ps tiff x xml zlib
Version return code is 0
Version: ImageMagick 6.9.0-0 Q16 x86_64 2014-12-12 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates (built-in): bzlib fontconfig freetype gslib jng jpeg lcms pangocairo png ps tiff x xml zlib
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: PDF to JPG not working from php front end
That would seem to imply that IM can find ghostscript. But did you install the ghostscript fonts also?Delegates (built-in): bzlib fontconfig freetype gslib jng jpeg lcms pangocairo png ps tiff x xml zlib
Did you try
convert image.pdf image.png
Does that work?
Re: PDF to JPG not working from php front end
it think it worked - whatever we did its working now
FYI there are many sources and things i had to rely and look for e.g.
http://this-is-how-i-did-it.blogspot.co ... ck-on.html
http://mac-dev-env.patrickbougie.com/autoconf/
and a few more depending on your server
thanks again
FYI there are many sources and things i had to rely and look for e.g.
http://this-is-how-i-did-it.blogspot.co ... ck-on.html
http://mac-dev-env.patrickbougie.com/autoconf/
and a few more depending on your server
thanks again
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: PDF to JPG not working from php front end
Glad to hear that you finally got it to work. Was there anything you found out from the other sources that might help some one else with the same problem?