WebCat, sudo and ImageMagick
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 40605
interpreted = N
texte = Hello,I am trying to use ImageMagick on a RedHat linux 7.2 system to create thumbnails form uploaded pics.Here is the code I am using. At this point I may have totally screwed it up with all the things I have tried.---[Listfiles path=./] [hideif [isfolder]=t] [hideif [filename]^html] [text]imagepath=[fullpath][/text] [text]image_id=[getchars start=5&from=end][FileName][/getchars][/text] [text]imagename=[FileName][/text] [text]image_width=[fileinfo file=./[filename]][imagewidth][/fileinfo][/text] [text]image_height=[fileinfo file=./[filename]][imageheight][/fileinfo][/text] [showif [image_width]=225][text]thumb_w=122[/text][/showif] [showif [image_width]=185][text]thumb_w=100[/text][/showif] [showif [image_height]=225][text]thumb_h=122[/text][/showif] [showif [image_height]=185][text]thumb_h=100[/text][/showif]
[shell].sudo -u convert -geometry [thumb_w]x[thumb_h] ./[imagename] ./t[imagename][/shell]
[image_id] | [imagename] | [ModDate] | [ModTime] | [image_height] | [image_width] | [thumb_h] | [thumb_w] |
[/hideif] [/hideif][/listfiles]---The remainder of the table is outside this code and the table does render correctly.I have configured the sudo users file to allow the user apache (which is what webcat runs as) to be allowed to use convert (/usr/local/sbin/convert).the code properly reads the picture files and displays the size as well as what the thumb size should be.I can place an ls within the [shell] tags and that executes so I am thinking there is something I am doing wrong in regards to configuring sudo to allow apache to run these imagemagick commands.ThanksDale-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Hello,I am trying to use ImageMagick on a RedHat linux 7.2 system to create thumbnails form uploaded pics.Here is the code I am using. At this point I may have totally screwed it up with all the things I have tried.---[Listfiles path=./] [hideif [isfolder]=t] [hideif [filename]^html] [text]imagepath=[fullpath][/text] [text]image_id=[getchars start=5&from=end][FileName][/getchars][/text] [text]imagename=[FileName][/text] [text]image_width=[fileinfo file=./[filename]][imagewidth][/fileinfo][/text] [text]image_height=[fileinfo file=./[filename]][imageheight][/fileinfo][/text] [showif [image_width]=225][text]thumb_w=122[/text][/showif] [showif [image_width]=185][text]thumb_w=100[/text][/showif] [showif [image_height]=225][text]thumb_h=122[/text][/showif] [showif [image_height]=185][text]thumb_h=100[/text][/showif][shell].sudo -u convert -geometry [thumb_w]x[thumb_h] ./[imagename] ./t[imagename][/shell]
[image_id] | [imagename] | [ModDate] | [ModTime] | [image_height] | [image_width] | [thumb_h] | [thumb_w] |
[/hideif] [/hideif][/listfiles]---The remainder of the table is outside this code and the table does render correctly.I have configured the sudo users file to allow the user apache (which is what webcat runs as) to be allowed to use convert (/usr/local/sbin/convert).the code properly reads the picture files and displays the size as well as what the thumb size should be.I can place an ls within the [shell] tags and that executes so I am thinking there is something I am doing wrong in regards to configuring sudo to allow apache to run these imagemagick commands.ThanksDale-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
dale
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Micro-managing External Links (2006)
multiple price line in formula.db (2004)
Can't access [OrderFile] OSXS WC4 (2000)
[append] (1997)
Certificates? (2005)
Field lenght (1998)
[ShowNext] feature in 2.0 (1997)
encryption madness (2003)
WebCat2: Items xx to xx shown, etc. (1997)
ACGI processing for .html (1997)
Re:2nd WebCatalog2 Feature Request (1996)
2.1 pricing? (1998)
I'm tired of all this! (2000)
OT: How to get more traffic to a site? (2005)
Classifieds (2000)
No Subject (1998)
OT - SCP on OSX (2005)
Sending mail (2001)
Great product and great job ! (1997)
Just Testing (1997)