[SOLVED] trouble with postscript
StefanL
Joined: 2005-07-26
Posts: 16 |
Posted: Tue, 2005-07-26 11:45 |
Hello I am new to gallery2 and I must say it's fantastic. But there is one problem, I can't get ImageMagick to work with postscript and pdf. Gallery is installed on an local intranet webserver for building up a huge picture database. So I can't provide you with any URLs. I hope you understand my damn bad english... :-? |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
Posted: Tue, 2005-07-26 11:51 |
for me, it's listed and it works. possible reason that it doesn't work for you: edit: usually it's because Ghostscript is not in the path of the webserver user. imagemagick uses Ghostscript to do this ps stuff. |
|
StefanL
Joined: 2005-07-26
Posts: 16 |
Posted: Tue, 2005-07-26 12:09 |
thx valiant for your hints, but that's not the problem. 2. I changed the user and tried again from commandline and it worked perfect, I could identify and convert the eps file I uploaded before. Maybe it's the IM Version (6.2.3) ??? |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
Posted: Tue, 2005-07-26 12:15 |
please activate buffered debug mode and then go to site admin -> imagemagick and click test. |
|
StefanL
Joined: 2005-07-26
Posts: 16 |
Posted: Tue, 2005-07-26 12:55 |
thx for your support! |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
Posted: Tue, 2005-07-26 12:59 |
i forgot: you have to change a line in config.php to activate the buffered debug mode, it's explained in config.php. |
|
StefanL
Joined: 2005-07-26
Posts: 16 |
Posted: Tue, 2005-07-26 13:59 |
thx found it... that's the interesting part of the output from debug: Executing: ( "/usr/local/bin/identify" "/opt/lampp/htdocs/gallery2/modules/imagemagick/classes/../test/data/test.eps" ) 2>/opt/lampp/htdocs/gallery2/g2data/tmp/g2dbglTuPpF file_exists(/opt/lampp/htdocs/gallery2/g2data/tmp/g2dbglTuPpF) filesize(/opt/lampp/htdocs/gallery2/g2data/tmp/g2dbglTuPpF) fopen(/opt/lampp/htdocs/gallery2/g2data/tmp/g2dbglTuPpF, r, 0) feof(Resource id #110) fgets(Resource id #110, 4096) feof(Resource id #110) fgets(Resource id #110, 4096) feof(Resource id #110) fgets(Resource id #110, 4096) feof(Resource id #110) fgets(Resource id #110, 4096) feof(Resource id #110) fclose(Resource id #110) unlink(/opt/lampp/htdocs/gallery2/g2data/tmp/g2dbglTuPpF) Regular Output: Error Output: sh: gs: command not found sh: gs: command not found identify: no decode delegate for this image format `/opt/lampp/htdocs/gallery2/modules/imagemagick/classes/../test/data/test.eps'. Status: 1 (expected 0) seems to me IM isn't build within the gslib, is that right? |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
Posted: Tue, 2005-07-26 14:08 |
nope, when you say it works for you in the command line (identify somefile.eps / identify somefile.ps), then it means gs is not in path for your webserver user. |
|
StefanL
Joined: 2005-07-26
Posts: 16 |
Posted: Tue, 2005-07-26 14:10 |
ok, that helps... |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
Posted: Tue, 2005-07-26 14:17 |
google it. honestly, i google all the time for stuff i don't know. i guess you want to add /usr/bin to the path in httpd.conf http://www.google.com/search?hl=en&lr=&c2coff=1&q=httpd.conf+env+path&btnG=Search |
|
StefanL
Joined: 2005-07-26
Posts: 16 |
Posted: Tue, 2005-07-26 14:52 |
ok, I googled alot, read alot, but didn't find anything, that's wrong with my configuration. |
|
StefanL
Joined: 2005-07-26
Posts: 16 |
Posted: Wed, 2005-07-27 07:41 |
Hello again, I tried and tried but can't get IM to work with eps from script. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
Posted: Wed, 2005-07-27 07:56 |
did you say it worked from other php scripts on the same webserver? |
|
StefanL
Joined: 2005-07-26
Posts: 16 |
Posted: Wed, 2005-07-27 08:54 |
valiant wrote:
did you say it worked from other php scripts on the same webserver? I did some tests this morning and found out, that it doesn't work from other scripts too. Now its not a gallery2 problem, seems to be a GS problem. I will try to reinstall gs and IM now. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
Posted: Wed, 2005-07-27 09:06 |
nope. it's not a im or gs problem. |
|
StefanL
Joined: 2005-07-26
Posts: 16 |
Posted: Wed, 2005-07-27 09:21 |
I read Zürich is your location, do you speak german? |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
Posted: Wed, 2005-07-27 09:24 |
i mean the PATH env and yes, i speak german. but your english is good and we try to keep everything in the official forum language. as to your su nobody attempt: i had this PATH issues too once. i tried to install oracle and couldn't figure out why it complained / didn't work. i've even added the correct path to the PATH env variable in the httpd.conf etc. |
|
StefanL
Joined: 2005-07-26
Posts: 16 |
Posted: Wed, 2005-07-27 11:08 |
THX for your help i figured out how to get it to work now. there is a file named delegates.xml containing the commands IM uses to handle the different filetypes. I found some lines that call gs and changed this pathes. changed line: notice the '/usr/local/bin/' in front of gs! that did the trick. Hope this is helpful for other people having trouble with that sh... |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
Posted: Wed, 2005-07-27 11:09 |
that's cheating marking the topic as solved. |
|