ImageMagick/ghostscript/thumbnail problem

642 views
Skip to first unread message

DGire

unread,
Sep 1, 2009, 6:00:36 AM9/1/09
to ResourceSpace
Hello again,

I've a problem creating thumbnails. It works fine for jpg's but when
I enable ImageMagick it comes back with an error regardless of what
filetype I try it on and it doesn't create the thumbnail but does add
the file to the database

"Received HTTP status 502 Bad Gateway"

If I go to the installation check it tells me Imagemagick is OK.

I'm running this on a windows 2003 server with IIS6.

PHP version 5.3.0 OK
MySQL version 5.1.37-community OK
GD version bundled (2.0.34 compatible) OK
ImageMagick-6.5.4-Q16
Ghostscript gs8.70
ResourceSpace_2_2_1289

With or without ImageMagick disabled in the config file Ghostscript
won't create thumbnails for PDF's either. Not sure it's related
perhaps for another post.

DGire

unread,
Sep 1, 2009, 10:33:16 AM9/1/09
to ResourceSpace
It seems I get that error if I uncomment anything in

# ---- Paths to various external utilities ----


Below is a copy of my config file. I tried using the dos paths eg; c:
\progra~1 etc instead of the full paths but that wouldn't work... and
the exiftool doesn't work and it has a short path.

<?php
###############################
## ResourceSpace
## Local Configuration Script
###############################

# All custom settings should be entered in this file.
# Options may be copied from config.default.php and configured here.

# MySQL database settings
$mysql_server = 'localhost';
$mysql_username = 'root';
$mysql_password = 'xxxxxxxxx';
$mysql_db = 'imagebank';

# Base URL of the installation
$baseurl = 'http://base:8888';

# Email settings
$email_from = 'xxxxxxxxxxxxx';
$email_notify = 'xxxxxxxxxxxx';

$spider_password = 'xxxxxxxxxxx';
$scramble_key = 'xxxxxxxxxx';

# Paths
$research_request = false;
$config_windows = true;
$ftp_server = 'my.ftp.server';
$ftp_username = 'my_username';
$ftp_password = 'my_password';
$ftp_defaultfolder = 'temp/';

# Enable work-arounds required when installed on Microsoft Windows
systems
$config_windows=true;

$plugins=array("refineresults");

# ---- Paths to various external utilities ----

# If using ImageMagick, uncomment and set next 2 lines
$imagemagick_path="D:\\Program Files\\ImageMagick-6.5.4-Q16";
$ghostscript_path="C:\\gs\\gs8.70\\bin";

# If using FFMpeg to generate video thumbs and previews, uncomment and
set next line.
# $ffmpeg_path="/usr/bin";

# Install Exiftool and set this path to enable metadata-writing when
resources are downloaded
# $exiftool_path="c:/";

Mike

unread,
Sep 2, 2009, 10:43:06 AM9/2/09
to ResourceSpace
Hi DGire,

I assume you are running RS on windows. One thing I noticed when you
install ImageMagic, GS, and Exiftool try to install them directly to
your C:\ or D:\. For some reason the path doesn't work when you have
spaces like in "D:\\Program Files...". I had the same problem and to
get around it had to install them as follows:

# If using ImageMagick, uncomment and set next 2 lines
$imagemagick_path="C:/IM";
$ghostscript_path="C:/gs/gs8.64/bin";

# If using FFMpeg to generate video thumbs and previews, uncomment and
set next line.
$ffmpeg_path="C:/IM";

# Install Exiftool and set this path to enable metadata-writing when
resources are downloaded
$exiftool_path="C:/ExIFTool";

I'm also using RS v 2.1.890 so not sure what would have changed in 2.2
but this may help you.

Mike

Gizzmo

unread,
Sep 2, 2009, 10:34:26 AM9/2/09
to ResourceSpace
Looks like I have the same problem
Jpg files get a thumbnail whitout any problem
Once i try a eps file i get the "no preview avalible"

Any ideas?

Merrickk

unread,
Sep 2, 2009, 9:12:12 AM9/2/09
to ResourceSpace
Where did you get this version of RS? Is that a typo? 1289? 1269 is
what is currently posted.

I'm also trying to get this working on IIS6 2003

mer,

On Sep 1, 10:33 am, DGire <davidg...@gmail.com> wrote:

Merrickk

unread,
Sep 2, 2009, 11:18:21 AM9/2/09
to ResourceSpace
Never mind, i saw this version in another thread.

Still having major issues with IIS.

Nuno Caminada - Gmail

unread,
Sep 2, 2009, 11:03:30 AM9/2/09
to resour...@googlegroups.com
Hello,

I´m also having problems with ImageMagick on MS Server 2003, IIS6 and RAW
files.

It seems that the "DCRAW" component has issues with MS Server 2003.

I was finally able to solve the problem with a version of DCRAW compiled on
Server 2003
(http://www.insflug.org/raw/article/39/dcraw-build-883-built-with-microsoft-compiler-update).
Perhaps this affects other components as well.

My suggestion would be to download all source files and compile all parts of
ImageMagick on a Server 2003 machine with MS Visual Studio.

A RS installation on XP worked without any glitches, this seems to be a
Vista and Server 2003 issue.

Good luck.

NC

DGire

unread,
Sep 3, 2009, 10:04:41 AM9/3/09
to ResourceSpace
Thanks for the feedback.

I have the exiftools installed on the C: drive in c:\exiftools .
Config file has the following line and $exiftool_path="c:/"; and in
the installation check I get an 'OK' . I've disabled everything else
including GS and Imagemagick. When I try to import an image I get the
"Received HTTP status 502 Bad Gateway". So I don't think it's related
to the spaces as there are none in that path. I wish I understood
what it was doing after I hit the import button so I could
troubleshoot. Will keep digging as the ResourceSpace is pretty slick
& fast and I don't want to give up now..!

On on related note where should the Exif info show up... I don't see
any exif info anywhere so perhaps it's just not working.



On Sep 2, 4:03 pm, "Nuno Caminada - Gmail" <nuno.camin...@gmail.com>
wrote:
> Hello,
>
> I´m also having problems with ImageMagick on MS Server 2003, IIS6 and RAW
> files.
>
> It seems that the "DCRAW" component has issues with MS Server 2003.
>
> I was finally able to solve the problem with a version of DCRAW compiled on
> Server 2003
> (http://www.insflug.org/raw/article/39/dcraw-build-883-built-with-micr...).

Merrickk

unread,
Sep 3, 2009, 3:16:50 PM9/3/09
to ResourceSpace
In IIS6, Win2003 I had to install the Visual C++ runtime libraries
32bit (my system) for ImageMagick to work.

Mer

DGire

unread,
Sep 4, 2009, 5:26:12 AM9/4/09
to ResourceSpace
Install that but didn't make a difference.

The 502 error indicates one of the following. I get the message
straight away so I doubt it's a timeout issue.

502 - Web server received an invalid response while acting as a
gateway or proxy.
502.1 - CGI application timeout.
502.2 - Error in CGI application.
> > > NC- Hide quoted text -
>
> - Show quoted text -

Merrickk

unread,
Sep 4, 2009, 7:16:45 AM9/4/09
to ResourceSpace
Did you add the iis user to the directories where the extensions are
stored?

Also, I had to add command line access to the IIS user even though I
was using FastCGI.

cacls c:\windows\system32\cmd.exe /E /G IUSR_MYPC:F

iusr_mypc make your own value.

This got my uploads working, however I still have no thumbnails. Also
video playback isn't working, but video thumbnails are working....

Mer
Message has been deleted
Message has been deleted

Moxtell

unread,
Sep 12, 2009, 6:38:47 PM9/12/09
to ResourceSpace
Hey
Ia have the exact same problem.
All looks OK - but only default Thumbnails - also for PDF etc. Have
tried all the above with no luck.
RS uploads fine - but no thumbnail/preview of anything. ImageMagick is
installed - I have tried installing other versions - have installed
direclty in C:/IM etc. No luck. Have of course changed config files
accrodingly...

My Install check says:

PHP version 5.2.4 OK
MySQL version 5.0.24a-community-nt OK
GD version bundled (2.0.34 compatible) OK
PHP.INI value for 'memory_limit' 256M OK
PHP.INI value for 'post_max_size' 100M OK
PHP.INI value for 'upload_max_filesize' 100M OK
Write access to 'filestore' directory OK
Blocked browsing of 'filestore' directory OK
ImageMagick OK
FFmpeg OK
Ghostscript FAIL: 'C:\Program Files\gs/gs' not found
EXIF extension installed FAIL
Exiftool OK

Ghostcript will not show up - have installed it twice in different
directories...
My Config sayes:

###############################
## ResourceSpace
## Local Configuration Script
###############################

# All custom settings should be entered in this file.
# Options may be copied from config.default.php and configured here.

# MySQL database settings
$mysql_server = 'localhost';
$mysql_username = 'root';
$mysql_password = '********';
$mysql_db = 'resourcespace';

# Base URL of the installation
$baseurl = 'http://www.okologi.dk/DAM1';

# Email settings
$email_from = 'mym...@okologi.dk';
$email_notify = mym...@okologi.dk';

$spider_password = '*******';
$scramble_key = '*******';

# Paths
$research_request = false;
$config_windows = true;
$imagemagick_path='C:\ImageMagick-6.3.0-Q16';
$ffmpeg_path='C:\Program Files\ImageMagick-6.4.5-Q16';
$ghostscript_path='C:\Program Files\gs';
$exiftool_path='C:\exiftool';
$defaultlanguage = 'da';
$ftp_server = '192.0.0.1';
$ftp_username = 'username';
$ftp_password = 'password ';
$ftp_defaultfolder = 'DAM1/';


Any clues? PLease help....

:(
Morten
> > > - Show quoted text -- Skjul tekst i anførselstegn -
>
> - Vis tekst i anførselstegn -

Merrickk

unread,
Sep 15, 2009, 2:19:49 PM9/15/09
to ResourceSpace
Try changing the paths to non spaces directories.

$ffmpeg_path='C:\Program Files\ImageMagick-6.4.5-Q16';
$ghostscript_path='C:\Program Files\gs';

Make sure security for all noted paths have write access via the iis
user.

Mer

Moxtell

unread,
Sep 16, 2009, 5:54:25 AM9/16/09
to ResourceSpace
Allready done that.

Imagemagick is in c:\IM8
Ghost in: C:\gs

Both folders has IUSR permission set to read/write
I have also enabled network_system with read/write

Also in IIS all is set to that. I have set the ResourceSpace folder to
the same as well.

I have an idea that this is a permission issue, but still - I have
given all permissons by the book and can´t see what is wrong. And thre
is no error-messeges from ImageMagick - it just doesn´t make any
thumbnails at all - only shows the default = jpg.png from the No-
preview directory....I have troed almost everything....could it help
to set up a Linux server? Is it an Imagemagick vs. IIS6/MS
Webserver2003 issue??? Any help will be mostly appreciated....

:(
Morten
> > > - Vis tekst i anførselstegn -- Hide quoted text -

Merrickk

unread,
Sep 16, 2009, 3:43:55 PM9/16/09
to ResourceSpace
Did you add the command line authority? It's noted in another thread,
i'll find it and link...


Mer

Merrickk

unread,
Sep 16, 2009, 4:00:16 PM9/16/09
to ResourceSpace
http://rswiki.montala.net/index.php/Installing_on_Windows

the note about command line made some things work for me.

Mer

Moxtell

unread,
Sep 16, 2009, 4:39:25 PM9/16/09
to ResourceSpace
Hey Merrickk

My man!!!!! I had tried it before, but had forgot one thing - to
change the process identity from "Network Service" to "Local System"
in IIS6. Now it works - at least Imagemagick makes thumbnails now - so
I can test it at see if it will make thumbnails of EPS, PDFs etc. as
well. Thx man - I have been busting my a.... for this for nearly 5
days now.

:)
> > > > - Show quoted text -- Hide quoted text -

DGire

unread,
Sep 17, 2009, 5:33:52 AM9/17/09
to ResourceSpace
Let us know how you get on Moxtell with eps's etc....

Merrickk

unread,
Sep 17, 2009, 7:55:46 AM9/17/09
to ResourceSpace
Sweet dude.

I'm still having some problems. But glad you got that roadblock
worked out.

Mer

Moxtell

unread,
Sep 18, 2009, 10:26:19 AM9/18/09
to ResourceSpace
Hi Folks

It works - and it seems that everything works as well.
Now I have thumbnails for EPS, AI, Indesign files, jpg, tiff, gif,
png, PDF etc.
So it works now....

It was a permission/security issue....

:)

Merrickk

unread,
Sep 18, 2009, 11:10:38 AM9/18/09
to ResourceSpace
Does video playback work within the window?

May be picking your brain now on some of this stuff that doesn't work
on mine.

What build did you finally use?

mer

DGire

unread,
Sep 19, 2009, 6:06:10 AM9/19/09
to ResourceSpace
What permissions and where...???

Thanks.... glad you got it working...

Moxtell

unread,
Sep 20, 2009, 11:57:51 AM9/20/09
to ResourceSpace
Hi Merrickk and Dgire

I will be doing some serious tests and return in the following two
weeks - hope you are patient.

Videoplayback - actually I haven´t tested video yet....I´ll do very
soon...

Permissions - yes I gave IUSR read, write and mod permissions I
think,but I will follow up on that as well.
Have to get back to work to find out all these things - I´ll be back -
I promise!

:)
Morten
Reply all
Reply to author
Forward
0 new messages