Thumbnailing with NetPBM and Movable Type

One of the most use­ful appli­ca­tions of MT is to set up an online pic­tures diary and using all the in-built fea­tures for pho­to­shar­ing. Prob­lem is that despite mt-check.cgi rec­og­niz­ing Image::Magick on your server, you can­not cre­ate thumb­nails (you only end up with the dreaded 500 server error). Guess what, just as effi­cient as imagemag­ick are the NetPBM libraries and this lit­tle tuto­r­ial should have you work­ing in no time.

So you have Mov­able­Type and can­not get it to sup­port thumb­nail­ing with either Image::Magick or with NetPBM? This is a tuto­r­ial to help you work with NetPBM,
Imagemag­ick is for another day. (PS: From my expe­ri­ence, there is no notice­able
dif­fer­ence in the oper­a­tional effi­ciency or speed of using either, in case that
is what you were wor­ried about).

So, let's get cracking.

  1. First, you need NetPBM bina­ries. Many web­hosts may have installed the libraries
    but the bina­ries for NetPBM are small and cute, so it doesn't really hurt
    to have your own. Grab the NetPBM bina­ries from here.

    Note: This is in Win­dows ZIP for­mat, if you need gzipped ver­sions please write to
    me, or grab them off NetPBM's
    website.
  2. Unzip these files (they will cre­ate a NetPBM folder) and ftp the folder
    to your web server. Let us say you upload them into your folder within your
    MT folder as follows:

    /home/DOMAIN/www/mt/netpbm
  3. Now, you need to set CHMOD all files inside netpbm to 755 (exe­cutable). Assum­ing you are into your netpbm folder,
    chmod 755 *
  4. To make sure that the bina­ries are in proper order, try check­ing on some of the included binaries:
    ./jpegtopnm –version

    or

    ./pnmcut –ver­sion

  5. Assum­ing that you see the info about the utils you tested (as above), we now need to make sure MT rec­og­nizes *your* NetPBM. TO do this, open your mt.cfg and mod­ify the fol­low­ing two options:
    ImageDriver NetPBM
    NetPBM­Path /home/DOMAIN/www/mt/netpbm
  6. Upload your mt.cfg. Let's check if MT can indeed find your NetPBM. From within your MT folder (one up from NetPBM folder), exe­cute the fol­low­ing com­mand in your shell – 
    perl –Iextlib –MIPC::Run –e 1
  7. If you are lucky (and you should be, really, in most cases) then you are
    all set — you can try the UPLOAD FILE from your MT now. If you have prob­lems
    here, let me know. It is usu­ally related to IPC::Run but hope­fully this shouldn't be required.
    TIP: If you encounter IPC errors, ONLY THEN fol­low the next step.
  8. Per­form the fol­low­ing steps ONLY if you expe­ri­ence the IPC error out­lined in step 7 – 
    1. Get IPC files: http://sniptools.com/av/IPC.zip
    2. Unzip it, it will cre­ate an IPC folder.
    3. Upload the IPC folder as-is to your MT/extlib directory.

Time to start thumbnailing!

  • Craig

    thanks! this was very use­ful for me, i have imagemag­ick work­ing but couldnt get it to work with mov­able­type. i guess i will set­tle for netpbm. would be so nice if they could make their bina­ries a lit­tle more available!

  • Shashank

    No wor­ries Craig. Where is your blog located?

  • Kate Sum­bler

    Thanks for the clear instruc­tions. I am still not able to get this to work, however… :(

    I don't know what I am doing wrong, as I have fol­lowed the instruc­tions (many times over, in fact) and still can't get it to work.

    Cur­rently, I am just get­ting a server error after I click the upload but­ton. Never gets to the dia­log box where I expect it should men­tion the thumb­nail option.

    Any ideas?

  • Kate Sum­bler

    OK, I just ran the perl part from step 6 on my PC and got this error:

    C:\sambar53\perl>perl –Iextlib –MIPC::Run –e 1
    Can't locate IPC/Run.pm in @INC (@INC con­tains: extlib C:/sambar53/perl/lib C:/sambar53/perl/site/lib .).
    BEGIN failed – com­pi­la­tion aborted.

    I installed the con­tents of the IPC.zip file in my MT/extlib direc­tory and still get this same error message.

    I'm start­ing to think that I am just not going to be able to do the thumbnails… :(

  • http://sniptools.com snip­tools

    Kurt, looks like you are on Win­dows. I have thumb­nail­ing run­ning on Win­dows XP as well, so I am pretty sure it works.

    I have some questions –

    1. Do you have the netpbm bina­ries that are com­piled for Win­dows: http://gnuwin32.sourceforge.net/packages/netpbm.htm

    2. In your mt.cfg, what is the path you give to netpbm?

    3. In your last mes­sage, you men­tioned the IPC error, this has to do with Run.pm not being found. Can you try putting IPC::Run in your "perl/site/lib" folder as well? (This is kludg­ish but just to see if it'll work)

  • Kate Sum­bler

    1. I down­loaded this file: http://prdownloads.sourceforge.net/gnuwin32/netpbm-10.6-bin.zip?download and unzipped it.

    2. c:\sambar53\cgi-bin\mt\netpbm If you want to see my mt-cfg details, I have installed mt-medic at this address: http://198.109.164.98/cgi-bin/mt/mt-medic.cgi (The pass­word to login to view the con­fig­u­ra­tion is 'yasgur')

    3. I just tried copy­ing the IPC folder into the perl/site/lib and still get the same problem…

    Thanks for the help!

    -=kt=-

  • Kate Sum­bler

    OK, I hate to reply to myself, but I thought I would add this info:

    I just tried upload­ing a 449 KB .jpg file, and got the server error (500), but if I selected a smaller file 22KB I get the nor­mal dia­log box ask­ing me if I want to cre­ate a popup or embed­ded image. But not the thumb­nail prompts. So, it seems I can upload smaller images but some­how a larger one causes some kind of error.

    Maybe what­ever is caus­ing this error is also the cause of the NetPBM not work­ing? I don't know… I thought I'd add this since I just noticed this hap­pen­ing in case it might help you to help me! Thanks again for the help!

    -=kt=-

  • http://sniptools.com snip­tools

    Kate, I tried vis­it­ing your medic site but the pass­word is invalid. I guess I am not inter­ested in the entire con­fig you have going, but only the lines for NetPBM and thumb­nail­ing. Let me try some stuff and see if I can come up with anything.

  • Clive Ros­ter

    I set up my MT a month ago using these instruc­tions and came back now because of all the kludg­ish workarounds, script tricks etc etc that go into mak­ing a pho­toal­bum work with MT. If you ask me, it is just not worth it..even the thumb­nal­ing because if I have 50 pics to upload, it gets awe­fully tir­ing to do them using the upload fea­ture on MT. Much eas­ier to just make them using a PS action and then let MT rec­og­nize them through the entries I create.

    Come to think of it, it is def­i­nitely worth it to roll out your own lit­tle pic album script if you can find the time. Takes a max of 1 week or so but you are free from all the quixotic pix­els (if you know what I mean) type workarounds.

  • http://sniptools.com snip­tools

    Thanks for the thoughts. Yes, using mt for pho­toal­bums soon gets pretty tir­ing. But for peo­ple who don't know (or don't want to know) cod­ing them­selves, it def­i­nitely helps to use mt or any other tool (e.g., PHP Gallery).

    As for the thumb­nails, that I agree with totally. After a while thumb­nail­ing is a lot sim­pler with­out online "inter­ven­tion". But that would defeat the pur­pose of this page so I'll try to find some ideas for Kurt anyway :-)

  • Kate Sum­bler

    Hey, guess what??? After about the 1000th unsuc­cess­ful rein­stall of NetPBM and IPC::Run, I finally decided to try the Image::Magick stuff again.

    Took me a cou­ple hours, but sud­denly, out of the blue, mt-check said the mag­ick 😉 words!

    Image::Magick…
    Your server has Image::Magick installed (ver­sion 5.26).

    I really have no idea what I did dif­fer­ent this time, if it was a dif­fer­ent ver­sion of the file or what, but Image::Magick is installed and seems to work! The only glitch I am suf­fer­ing is related to my local site/archive paths in MT. My web files are on my d: drive and no mat­ter how I con­fig­ure things, the path MT cre­ates for the thumb­nail image includes the local path (d:/docs/blog…) in the mid­dle of the URL. I can man­u­ally fix the URL before post­ing, so I'm con­sid­er­ing it working!

    Thanks again for the time and effort you gave toward help­ing me. I really appre­ci­ated the fact that you were will­ing to give me a hand, even though we don't know each other!

    Have a great day!

    -=kt=-

  • monas­tic

    came to your page from mt forums, thx for the use­ful page. i got my netpbm work­ing. can u aslo make the IPC file avail­able in tar.gz so that linux users can also use it?

  • http://sniptools.com snip­tools

    Thanks monas­tic, but I guess Linux users should be savvy enough to grab a valid IPC :)

  • Green­lan­der

    Shashank– thanks a lot for this page. Came from the MT forums and got lost. Too many threads with dozens of opin­ions but on this mat­ter but no intel­li­gi­ble solutions :-)

    I still have a big prob­lem, though, it seems. After the thumb­nail options, I get this error mes­sage: >>> Bro­ken pipe: write( 14, […] ) at /usr/home29/hinrichs/public_html/cgi-bin/movabletype/extlib/IPC/Run/IO.pm line 582

  • Greenal­nder

    For­got to add:
    Of course I changed the mt.cfg, too. :-)

  • http://www.superdeluxo.com/blog_archives/2003/06/21/happiness_is_a_warm_blog.html SuperDeluxo4

    Hap­pi­ness is a warm blog

    I'm happy for a num­ber of rea­sons. I found out that [function+delete] does a for­ward delete on lap­top key­boards and my friend mz_informed showed me a pro­gram called uCon­trol that lets me set [function+touchpad-drag] like a mouse­wheel. The way i…

  • kiTz

    omg… thank you soO much for this page.. maN.. i could never get image::magick work­ing.. and i could tell my admin was try­ing his very best to put up with all my emails.. until i found this.. i fol­lowed the instruc­tions step by step and the darn thing finally works!! thank you so much.

  • Ruthie

    i found this site via the MT forums. I fol­lowed your direc­tions, but I do not get an option for thumb­nails. I am at a loss here, any help would be greatly appreciated.

  • Ruthie

    i spoke too soon. My NetPBM­Path con­fig­u­ra­tion set­ting was wrong. All is well. Sorry to have both­ered you :)

  • Oliver Link

    thanks so much for your instruc­tions. NetPBM now works on my web­server hosted exter­nally. I still would like to know about ImageMag­ick since I checked and it is installed on the server as a Perl mod­ule. any idea when you will post instruc­tions for that?

  • http://sniptools.com snip­tools

    Oliver, I haven't had the time to fig­ure out why Image::Magick doesn't work. It is installed on my sys­tems too, but MT still refuses to rec­og­nize it. I can use Mag­ick oth­er­wise with­out a hitch so either it is an issue with Image::Magick the perl mod­ule (unlikely, I imag­ine) or with MT's code (may be likely, given how many peo­ple have prob­lems with it).

    Will let you know if I choose to inves­ti­gate it any fur­ther in the future, although doesnt seem likely to be honest.

    Glad you got NetPBM work­ing though (ditto for Ruthie).

  • Jael

    Thank you so much for pro­vid­ing this tutorial!

    I down­loaded all kinds of dif­fer­ent netpm pack­ages, and none looked like what you pro­vided with your zip-file here. I was totally con­fused what I needed to upload. Hav­ing wasted two hours, with your tuto­r­ial I was set within 5 min­utes! Thank you!

  • Eva

    now I have installed like your tuto­r­ial but I got this mesaage when I tried upload­ing some images.

    MT::App::CMS=HASH(0x3f5708) Ille­gal char­ac­ter \015 (car­riage return) at extlib/IPC/Run.pm line 1.

    Please help me cause I need the pos­si­bil­ity to creat thumb­nails with my MT.
    Thank you so much.

    Cheers Eva

  • http://sniptools.com snip­tools

    Eva, please fol­low the instruc­tions on the 4th com­ment on this page which show you how to install your own IPC::Run stuff.

  • bhu­pal

    make sure you have down­loaded the right netpbm for your server.. you can find what server your host is run­ning at http://www.netcraft.com

  • http://sniptools.com snip­tools

    TO find what server your host is run­ning, our DIG A URL fea­ture above is pretty use­ful as well. :)Just go to the top of this page, for instance, and enter your web­site. Lots more info than Net­craft website.

  • b

    how do i execute

    perl –Iextlib –MIPC::Run –e 1

    i dont heve a shell access..

    Is there any­way i can find if nt is call­ing netpbm lib ?

  • http://sniptools.com snip­tools

    Install ActivePerl on NT and exe­cute in your DOS prompt. ActivePerl: http://www.activestate.com

  • b

    well but i can do that on my remote server? Whats the solu­tion if i want to do it in the remote server.

  • http://sniptools.com snip­tools

    If you dont have shell access, you can try exe­cut­ing that as a "sys­tem" com­mand through Perl. Can­not help you much there, sorry. Let me know it goes.

  • b

    so you are say­ing there is no way i can check if i my ipc::rum mod­ule is loaed well and runnin ??

  • b

    Is there a script to check if the IPC::RUN mod­ule is installed in the Freebsd server., like the way mt-check.cgi per­forms the mod­ules check ??

  • http://sniptools.com snip­tools

    MT-CHECK should actu­ally check IPC::RUN already.If you meant some­thing other than that, sorry I don't have the time to write it.

  • lyrrad

    Hi there! Great tuto­r­ial, pretty idiot proof, but some­times you know the evil machines just refuse to work.

    Just a lit­tle clar­i­fi­ca­tion though, when
    1)I exe­cute the "perl –Iextlib –MIPC::Run –e 1" do I have to be in any par­tic­u­lar direc­tory to run that? And

    2)For me I exe­cuted that line but noth­ing seemed to hap­pened. I thought that was a good sign, until I tried upload­ing in MT and it didn't offer me the thumb­nail option.

    Thank you. Regards.

  • http://sniptools.com snip­tools

    Yes, exe­cute that com­mand in the MT/Extlib folder (it should even work from within MT folder though.)

    If it does noth­ing, that is good. But if your MT still does not show the thumb­nails, then get the IPC from my web­site as sug­gested in this thread (4th com­ment above). If you have fol­lowed the NetPBM instruc­tions exactly as stated here, then give me another shout.

    Hope it works out for you.

  • lyrrad

    Hey there,
    yeah I tried that but still no cookie. My server runs on Linux and I used a gzip file ini­tially I found some­where, and I tried the ZIP from above. Well, I think my arms are up and wav­ing a white flag. :(

    PS: I just realise it says "On July 27, 2003 09:44 PM thus >spake

  • lyrrad

    Hey hey! Finally got it to work! I was try­ing to install gallery, and decided to put the netpbm files in the ~ direc­tory of the site.

    What hap­pened before was I put netpbm in my MT direc­tory. Try this just in case any­one else can't get it to work.

    Regards.

  • nosa

    I have fol­lowed all instruc­tions both with the Netpbm and IPC::Run. How­ever, i am still not get­ting the cre­ate thumb­nail option when upload­ing a file.

    Maybe a stu­pid ques­tion, but do i have to re-build MT or something?

    At the moment i am reciev­ing no errors so i have no point­ers to give.

    MT-Check isn't check­ing IPC::Run as Shashank sug­gested before, so i can't even con­firm if this is work­ing either.

    One ques­tion: I am pre­sum­ing my host doesn't have Netpbm (and there­fore the libraries you men­tioned), so is it right for me to just install the bina­ries as directed above or do i need more?

  • http://sniptools.com snip­tools

    nosa, what hap­pens when you exe­cute the com­mands sug­gested in step 4 above? feel free to include the out­put here (or send it to me by email)

    also, tell us your folder struc­ture. for lyrrad, the gen­tle­man who posted above you, it seems paths were crucial.

  • Ben

    Hello.

    I've come here from the MT sup­port forums too. Many thanks and con­grat­u­la­tions on a well writ­ten tuto­r­ial (and site!).

    Unfor­tu­nately, I'm hav­ing the same prob­lems as nosa: I've installed NetPBM under my ..www/mt/netpbm direc­tory with the cor­rect per­mis­sions, and I'm not get­ting the cre­ate thumb­nail option at all now.

    I don't have shell access to my web­server, so I can't ver­ify that libraries work prop­erly by run­ning the com­mand line sug­ges­tions in point 4. mt-check doesn't spec­ify any­thing about IPC::Run either.

    Its rather frus­trat­ing since the rea­son I'm try­ing to setup NetPBM is that the default MT setup with ImageMag­ick doesn't work. I've spent hours scour­ing the MT sup­port mes­sage­boards, but despite many peo­ple report­ing the same prob­lem, the only hint of a res­o­lu­tion was to use NetPBM (with a link to this post).

    I've to'd-and-fro'd with my web­host on this. They claim both ImageMag­ick and NetPBM are installed cor­rectly on their Linux servers. But the "out-of-the-box" MT setup causes Apache to throw a 500 Inter­nal Server error when try­ing to use the cre­ate thumb­nail fea­ture. Point­ing mt.cfg at the main NetPBM install (under /usr/local/)only throws the same error. Notably, I get the option to "cre­ate thumb­nails" in _both_ cases.

    Alas, after fol­low­ing your instruc­tions, I no longer even get this option.

    Any ideas?

  • http://sniptools.com snip­tools

    Ben,

    Thanks for the kind words. I can only offer a cou­ple of suggestions/notes –

    (1) You say you dont have shell access. With­out exe­cut­ing the NetPBM or IPC::Run, it is kind of dif­fi­cult to fig­ure out what is going wrong. Could you per­haps ask your host to exe­cute the two com­mands inside the cor­rect direc­tory on your server and let you know the out­put? I believe it is a rea­son­able request.

    (2) Sec­ondly, don't let your dif­fi­cul­ties with NetPBM keep you from thumb­nail­ing on your MT web­site. You'll soon real­ize (after you have used MT for a while) how painful the thumb­nail­ing stuff is, it is really a lot more pro­duc­tive to just KNOW your folder struc­ture and use Adobe PS or Paintshop to do auto thumb­nail­ing (you can cre­ate batch jobs in PS for exam­ple) and just upload the stuff in to the right fold­ers, and then use what­ever MT tem­plates you are using, e.g., the QuixoticPix­els template.

    Let me know how it goes.

  • sam

    I don't under­stand the step (6)Upload your mt.cfg. Let's check if MT can indeed find your NetPBM. From within your
    perl –Iextlib –MIPC::Run –e 1

    What am I sup­pose to do with this? I down­load all the required file and upload all the nec­es­sary file to my host­ing server accordinly to the instruc­tions but still can't see the thumb­nail option.

  • http://sniptools.com snip­tools

    Hi Sam,

    I have changed the instruc­tion to be a lit­tle more spe­cific. :) Basi­cally, you can exe­cute that line in your shell from your MT folder (one up on NetPBM). For instance, this folder:

    /home/DOMAIN/www/mt/

    Hope this helps. Thanks for point­ing out the half-baked instruction.

  • sam

    Hi,

    Thank you for the help. Sorry I don't know what do you mean by "shell". Should I exe­cute it by "http://www.mydomain.com/movable/perl –Iextlib –MIPC::Run –e 1 ?.

    Thanks

  • http://sniptools.com snip­tools

    Can you tel­net into your domain account? "Shell" ref­eres to the Unix/Linux shell. On Win­dows, it would be your MS DOS prompt. Any­thing that lets you exe­cute com­mands on the server. So once you tel­net (or if you have access to exe­cute com­mands on the server) then get into the direc­tory where you installed MT, and exe­cute that com­mand there.

  • sam

    Hi Shashank,

    Thank you. Is it nec­es­sary to run that com­mand in order to get the mod­ule function?

    I used to install other mod­ules which my host­ing server doesn't have in the extlib and it's works fine but this one seems not working.

  • http://sniptools.com snip­tools

    No, this com­mand is only to check that IPC::Run is work­ing with­out any hic­cups. If you can­not run it, thats ok as long as you see the thumb­nails option in your MT. If you dont see the option, then you may want to fig­ure out a way to run this com­mand or ask your host to run the com­mand for you. Let me know how it turns out.

  • sam

    Hi Shashank,

    Thank you very much for the help. I saw in the NetPBM's web­site that the down­load file that you pro­vided are cat­e­go­rized as an old type. May it does'nt work with Perl ver­sion 5.006.

    I noticed there are many down­load ver­sion, very con­fused which one to down­load. My host­ing server using Perl ver­sion 5.006. on win­dows 2000

  • http://sniptools.com snip­tools

    You're wel­come Sam. Unfor­tu­nately stuff like this is trial and error. If you get it work­ing, please con­sider post­ing the info here along with your envi­ron­ment. FWIW, I have NetPBM work­ing on my Win­dows XP machine with Perl 5.8. Cheers.

  • Guest

    Shashank, Ok let go through again on the setup rou­tine on these IPC and Netpbm stuff.

    1. Down­load the Netpbm bina­ries file (fol­low your link)
    2. Upload it into the mt folder(in may case it's movable/netpbm)
    3.Download and upload the IPC folder into the Extlib folder
    4.Changed the MT.cfg file in these two lines -
    ImageDriver NetPBM
    NetPBM­Path /home/domain/www/movable/netpbm

    Is there any­thing I left out? Can't seems to get it to work.…lol stranged!.

  • Rich

    This thread and your help is very much appre­ci­ated. I've learned a lot but still have resolved my par­tic­u­lar prob­lem. I am pretty much a novice with Perl, and may be doing some­thing obvi­ously dumb, but I have tried a lot of com­bi­na­tions and still no change.

    When I try to run upload an image I get the fol­low­ing mes­sage:
    >>Can't locate auto/Image/Size/jpegsize.al in @INC .… at … (my direc­tory info)/cgi-bin/movable/extlib/Image/Size.pm line 233

    … fol­lowed by …
    MT::App::CMS=HASH(0x8367258) Can't locate auto/Image/Size/autosplit.ix in @INC … /cgi-bin/movable/extlib/Image/Size.pm line 26
    — —  —  —  —  — -

    It turns out that the image file has actu­ally been copied into the tar­get direc­tory before this mes­sage appears. I am not espe­cially con­cerned about thumb­nail­ing — but I can't get past this mes­sage to man­age the images within entries, etc.

    You said: >>it is really a lot more pro­duc­tive to just KNOW your folder struc­ture and use Adobe PS or Paintshop to do auto thumb­nail­ing (you can cre­ate batch jobs in PS for exam­ple) and just upload the stuff in to the right fold­ers, and then use what­ever MT tem­plates you are using

    Thanks in advance for any sug­ges­tions you might have.

  • Rich

    Sorry to double-post, but I hit the "post" key too quickly:

    You said: >>it is really a lot more pro­duc­tive to just KNOW your folder struc­ture and use Adobe PS or Paintshop to do auto thumb­nail­ing (you can cre­ate batch jobs in PS for exam­ple) and just upload the stuff in to the right fold­ers, and then use what­ever MT tem­plates you are using

  • http://sniptools.com snip­tools

    Rich, are you using Image::Magick, or NetPBM as described in this tuto­r­ial? "Image/Size.pm" should be involved only if you are using ImageMagick.

  • Rich

    I am not using ImageMag­ick. My ISP has NetPBM installed and I have installed it — for good mea­sure — on my local direc­tory as well, as per the instruc­tions here. I just re-confirmed that my mt.cfg file spec­i­fies the NetPBM dri­ver and path.

    Any idea what might be call­ing Size.pm if not ImageMagick?

  • Rich

    To fol­low up on te idea that Size.pm relates to ImageMag­ick — I tried mov­ing the file out of the Image folder in the cgi-bin direc­tory. Then — try­ing to upload an image file — I got a new mes­sage that MT requires the Perl mod­ule to get pic­ture dimen­sions. And refers to the instal­la­tion instruc­tions to load it. The instal­la­tion instruc­tions talk about load­ing Size.pm inde­pen­dent of using ImageMag­ick — so I didn't get the connection.

    So it looks as though I've missed some­thing in telling MT that I'm not using ImageMag­ick and that I am using NetPBM — and there­fore, appar­ently don't need Size.pm?

    Am I mak­ing sense? Have I missed a set­ting somewhere?

  • http://sniptools.com snip­tools

    Rich,

    If you have "ImageDriver NetPBM" in your mt.cfg, then it should be using NetPBM, no wor­ries. As for the mes­sage, I am not sure what is dri­ving it. I can only sug­gest you to redo the steps in this tuto­r­ial once again, one by one. You really should not be get­ting error mes­sages in your "extlib/Images" folder, we have set up NETPBM inside the mt folder itself. Keep me posted.

  • Rich

    Thank you for your trou­ble — I will con­tinue looking.

    In the mean­time, can you tell me about the pro­ces for man­u­ally load­ing a pic? Into which file can it be loaded so it isn't wiped out by the next update?

    Thanks again — I'll let you know when I get this fig­ured out — in case some­one else has a sim­i­lar prob­lem later.

  • Gert

    Thanks for this extremely use­full page!

    I fol­lowed the instruc­tions, but I keep get­ting the error 500 page (which I got when I was try­ing to use ImageMag­ick too).

    My info:

    Uploaded the NetPBM stuff from your zip­file in /home/flabber/public_html/netpbm/

    Chmod­ded it all to 755.

    Then I got the error that IPC was miss­ing, so I installed IPC::run with CPAN.

    Run­ning "perl –Iextlib –MIPC::Run –e 1" then resulted in noth­ing, so that's good, right?

    Then test­ing cre­at­ing a thumb­nail resulted in an error 500.

    I uploaded the IPC stuff to /home/flabber/public_html/extlib/IPC/ just to be sure on the IPC part.. Didn't help.

    My entries in mt.cfg:

    ImageDriver NetPBM
    NetPBM­Path /home/flabber/public_html/netpbm

    Thanks in advance for your reply!

  • sam

    hmm… i seem to be get­ting the same error as Greenlander

    i get the thumb­nail option to show up now, but when I hit "popup" or "embed" the next screen i see is:

    Bro­ken pipe: write ((gib­ber­ish gib­ber­ish gib­ber­ish lots and lots of gibberish))

    at extlib/IPC/Run/IO.pm line 582

    any thoughts?
    thanks

  • http://sniptools.com snip­tools

    (1) Which ver­sion of MT are you using? I will assume the lat­est given that it is free anyway.

    (2) Which IPC run are you using? The files from the fourth com­ment here ( http://sniptools.com/av/IPC.zip ) should work on your sys­tem. Please run the test again.

    Let me know how it goes.

  • sam

    hi,
    i'm run­ning Ver­sion 2.64 of MT
    i just re-installed the IPC you site there in my extlib direc­tory and i'm stil hav­ing the same prob­lem — still get­ting that weird "bro­ken pipe" error
    thanks for your help on this

  • James Kul­czy­cki

    Hi. After many attempts at Image::Magick, I gave up even though my web­host swears it works for oth­ers. I came upon your tuto­r­ial for Netpbm in Mov­able Type forums. Your instruc­tions were help­ful and I finally got it work­ing, but I have some com­ments which may help you and other Mov­able Type users.

    1. I wasn't sure if the Netpbm bina­ries you are dis­trib­ut­ing would on a linux server, since the instruc­tions don't give details. They do. The Netpbm web­site (which you have linked) will point you to a dead link for the "offi­cial" linux distribution.

    2. I tried putting the Netpbm folder under the /mt folder on my server, but for what­ever rea­son, that did not work. So, I just put the folder under /public_html with success.

    3. My host (Dayana Host) appar­ently did not have IPC::Run installed, or it could not be found by MT, so I installed it under /mt/extlib with suc­cess. Per­haps you should include instruc­tions for down­load­ing and installing IPC::Run in the main text of your tuto­r­ial. Right now, the details are in the com­ments. This is prob­a­bly a com­mon prob­lem rather than an exception.

    4. Finally, one thing that is not made clear any­where until you notice it your­self… when using Netpbm (and prob­a­bly the same with Image::Magick), you will be cre­at­ing new image files which are the thumb­nail images, and they will take up space. Folks need to keep this in mind as using thumb­nails can eat up your disk quota. This might seem obvi­ous to the experts among us, but it was not obvi­ous for me until I noticed how much extra disk space I was using. Also, the Netpbm and IPC::Run files take up space too!

    Many thanks for your tutorial.

  • http://sniptools.com snip­tools

    Thank you so much for the very infor­ma­tive post, James! Much appre­ci­ated. Will move the IPC instruc­tions into the main tuto­r­ial, guess its high time. Cheers!

  • kacheng

    I had the prob­lem where ImageMag­ick appeared installed, but wouldn't work. A few oth­ers appear to have encoun­tered it as well.

    Solu­tion:
    You need to install the perl-ImageMagick rpm. I installed this, yelled, "Thumb­nail options, show thy­self!" and I had instant gratification!

    As I'm using apt-rpm, all I had to do was type:
    apt-get install perl-ImageMagick

    Hope that helps any­one who's try­ing to get those thumb­nails working!

  • kacheng

    I actu­ally meant ImageMagick-perl!

    Whoops.

  • Adam

    Thanks so much for this arti­cle. My pho­to­blog finally works thanks to you!

  • Foo Fighter

    I must be doing some­thing wrong. I upload NetPBM to my Public_Html direc­tory, CHMOD every­thing to 755, changed my MT.cfg set­tings to:

    ImageDriver NetPBM
    NetPBM­Path /home/myusername/public_html/netpbm

    Noth­ing works. The thumb­nail option isn't show­ing up in my File upload win­dow in MT. What am I doing wrong?

  • swf

    I was hav­ing the 'Bro­ken Pipe' prob­lem described above until I went to the Gallery site (http://gallery.menalto.com/index.php) and found the pre­com­piled bina­ries for freeBSD, which my host runs.

    I can cre­ate thumb­nails for images under 64k in size. Big­ger than that and I get…

    Resource tem­porar­ily unavail­able: write( 9, '…' ) at extlib/IPC/Run/IO.pm line 582

    Has any­body seen or fixed this problem?

  • swf

    I thought the 'resource tem­porar­ily unavail­able' prob­lem might be related to using pipes in the IPC::Run package.

    To test this, I made changes to MT's Image.pm so that the NetPBM pack­age wrote all of the inter­me­di­ate results to tem­po­rary files instead of using pipes.

    These changes are under pack­age MT::Image::NetPBM

    In sub init …

    changed

    IPC::Run::run(\@in, '{file} ? \undef : \$image->{data}), '|',
    \@out, \$out, \$err)
    or return $image->error(MT->translate(
    "Read­ing image failed: [_1]", $err));

    to

    IPC::Run::run(\@in, '{file} ? \undef : \$image->{data}), '>temp1');
    IPC::Run::run(\@out, 'temp2');
    open (TEMP, ";
    close(TEMP);

    In sub scale …

    changed

    if ($type eq 'gif') {
    push @quant, ([ "${pbm}ppmquant", 256 ], '|');
    }

    IPC::Run::run(\@in, '{file} ? \undef : \$image->{data}), '|',
    \@scale, '|',
    @quant,
    \@out, \$out, \$err)
    or return $image->error(MT->translate(
    "Scal­ing to [_1]x[_2] failed: [_3]", $w, $h, $err));

    to

    if ($type eq 'gif') {
    push @quant, ([ "${pbm}ppmquant", 256 ]);
    }

    IPC::Run::run(\@in, '{file} ? \undef : \$image->{data}), '>temp3');
    IPC::Run::run(\@scale, 'temp4');
    if ($type eq 'gif')
    {
    IPC::Run::run(@quant, 'tempq');
    IPC::Run::run(["cat"], 'temp5');
    }
    IPC::Run::run(\@out, 'temp5');
    local $/=undef;
    open (TEMP, ";
    close(TEMP);

    In my case, the temp files are wirt­ten (by default) to my Mov­able­Type instal­la­tion direc­tory (where my MT .cgi files are).

    There may be an eas­ier way to fix the real prob­lem or cleaner ways to make these changes, but this seems to be work­ing for me and for images over 64k in size.

    Also, since the NetPBM down­load included 'png­topnm' and 'pnm­topng', I added 'png' file sup­port by chang­ing sub init

    from

    my %Types = (jpg => 'jpeg', gif => 'gif');

    to

    my %Types = (jpg => 'jpeg', gif => 'gif', png => 'png');

  • swf

    REPOST

    I thought the 'resource tem­porar­ily unavail­able' prob­lem might be related to using pipes in the IPC::Run package.

    To test this, I made changes to MTs Image.pm so that the NetPBM pack­age wrote all of the inter­me­di­ate results to tem­po­rary files instead of using pipes.

    These changes are under pack­age MT::Image::NetPBM

    In sub init …

    changed

        IPC::Run::run(\@in, '<', ($image->{file} ? \undef : \$image->{data}), '|',
            \@out, \$out, \$err)
            or return $image->error(MT->translate(
                "Reading image failed: [_1]", $err));

    to

        IPC::Run::run(\@in, '<', ($image->{file} ? \undef : \$image->{data}), '>temp1');
        IPC::Run::run(\@out, '<temp1', '>temp2');
        open (TEMP, "<temp2");
        $out = <TEMP>;
        close(TEMP);

    In sub scale …

    changed

        if ($type eq 'gif') {
            push @quant, ([ "${pbm}ppmquant", 256 ], '|');
        }

        IPC::Run::run(\@in, '<', ($image->{file} ? \undef : \$image->{data}), '|',
            \@scale, '|',
            @quant,
            \@out, \$out, \$err)
            or return $image->error(MT->translate(
                "Scaling to [_1]x[_2] failed: [_3]", $w, $h, $err));

    to

        if ($type eq 'gif') {
            push @quant, ([ "${pbm}ppmquant", 256 ]);
        }

        IPC::Run::run(\@in, '<', ($image->{file} ? \undef : \$image->{data}), '>temp3');
        IPC::Run::run(\@scale, '<temp3', '>temp4');
        if ($type eq 'gif')
        {
         IPC::Run::run(@quant, '<temp4', '>tempq');
         IPC::Run::run(["cat"], '<tempq', '>temp5');
        }
        IPC::Run::run(\@out, '<temp4', '>temp5');
        local $/=undef;
        open (TEMP, "<temp5");
        $out = <TEMP>;
        close(TEMP);

    In my case, the temp files are wirt­ten (by default) to my Mov­able­Type instal­la­tion direc­tory (where the MT .cgi files are).

    There may be an eas­ier way to fix the real prob­lem or cleaner ways to make these changes, but this seems to be work­ing for me and for images over 64k in size.

    Also, since the NetPBM down­load I found included 'png­topnm' and 'pnm­topng', I added 'png' file sup­port by chang­ing sub init

    from

        my %Types = (jpg => 'jpeg', gif => 'gif');

    to

        my %Types = (jpg => 'jpeg', gif => 'gif', png => 'png');

  • Kevin Holzer

    MERCI UN MILLE FOIS.
    THANK YOU A MILLION TIMES.

    (and of course, eng­lish is my first lan­guage. but thanks any­ways. and sorry for shout­ing, but the inter­nets a big place.)

  • Guest

    this worked like a charm! I love the Web! Just search and you shall find…

  • Katie

    I've fol­lowed all your advice, includ­ing the intal­la­tion of IPC::Run. I now get the error

    exec failed: Text file busy at lib/MT/Image.pm line 151 at lib/MT/Image.pm line 151

    when try­ing to upload a file with thumb­nails. This is a huge improve­ment on the server error, but I must admit that I'm mys­ti­fied at this stage! Any advice on what to trou­bleshoot next?

    By the way, this is a fan­tas­tic resource!

    Thanks!

  • Katie

    Sorry to post again — I thought I should add that I only get the error mes­sage when try­ing to include thumbnails.

  • Katie

    Ignore my last com­ment — I have it work­ing now — and it works beau­ti­fully! Thanks so much!

  • http://sniptools.com snip­tools

    Hi swf, thanks for that use­ful change. I've installed NetPBM to work with MT on sev­eral machines and never faced that prob­lem, but sounds good! Thanks, Shanx

  • SMooSH

    Most excel­lent.
    I've never been able to get Image Mag­ick work­ing with MT, but this did the trick.
    Fantastic :)

  • SA-X

    Cheers mate, you've sorted me out!

    thanks, ill be sure to link you on my blog :)

  • http://www.torrentpls.net/archives/2003/11/26/thumbnails_imagemagick_and_netpbm.shtml TorrentPls.net

    Thumb­nails, ImageMag­ick and NetPBM

    Well, my host decided to change their instal­la­tion of ImageMag­ick, the soft­ware that Mov­able Type uses to gen­er­ate it's image thumb­nails. No thumb­nails for me. So, I went in search of a solu­tion, and found that MT can use an…

  • Kathie

    Ive tried ever­thing, seri­ously. But still doesnt work for me :( I still get 500.
    I never though I was THAT stupid.

  • http://sniptools.com snip­tools

    Kathie, tell us about your OS, ver­sion of MT, host­ing plat­form etc.

  • Kathie

    I have Win­dows XP, I use MT v. 2.64 and Im hosted at Netril­lium. If you wanna see my site it's http://memento – mori.org The place where I installed MT though is http://memento – mori.org/photo

  • http://sniptools.com snip­tools

    Kathie, I did not mean what OS you per­son­ally use, which OS you are hosted on would be the use­ful bit of info. Assum­ing it is Win­dows XP,

    (1) Have you fol­lowed all the steps out­lined in this tutorial?

    (2) Did you down­load the cor­rect Netpbm libraries? (For Win­dows, that is?)

    (3) What is the error you get? Do you have "Shell" access (Telnet/SSH) that'd allow you to exe­cute com­mands? E.g., what error do you see when you exe­cute step 4 in the tutorial?

    Let me know. It should not be so dif­fi­cult to sort out. Btw, I love the mast pic on your website!

  • Kathie

    Well you know what? I dont even know how to do the shell thing :( Maybe if you could tell me? I mean… do I do that with my FTP prog or some­thing else?

  • annette

    Hi — I'm a new­bie to blog­ging and MT and am try­ing to install this soft­ware (which I've done) but I don't under­stand how to chmode to 755 and won­der if some­one could walk me through that (sorry for such a naive ques­tion in the midst ofthis sea of knowl­edge lol!)

    Thanks (in anticipation!)

    annette

  • http://sniptools.com snip­tools

    annette, in your tel­net shell, just go to the direc­tory where the files are, and then do the following:

    chmod 755 *.*

    The "*.*" is the same as on any OS, it is a wild­card that means all files. If you don't want all files then just spec­ify the files you wish to change the mode for.

    If you don't know what a tel­net shell is, then even in your FTP soft­ware you may be able to just select the files on the server, then "Change Mode" or any­thing such. Most mod­ern FTP soft­ware will allow for this.

    Please let me know if you have any questions.

  • Kate Jenk­ins

    Just writ­ing to say THANK YOU THANK YOU THANK YOU.
    This infor­ma­tion was very hard to come by. If you hadn't taken the time to post this, I'd still be lost.

    I had the IPC error and upload­ing the files you sug­gested worked per­fectly for me. It took about 5 min­utes after find­ing your page to get thumb­nail­ing to work — and I had pre­vi­ously fought with ImageMag­ick for sev­eral days with no luck… You rule, that's all.

  • Jeff

    Thanks for a CLEAR set of instruc­tions, I'm not a server expert like many that use this and I was feel­ing a bit lost try­ing to fig­ure out Image Magik.

    Does any­one have any exam­ples of a good pho­to­blog for­mat? I'm try­ing to use a nice once from Quixotic.com, http://www.quixoticpixels.com/index.php?qp=photoblog

    It uses ImageMagic but I'm going to try and inte­grate Netpbm here.

    Thanks again!

  • nana

    Hi,
    i would very much appre­ci­ate your help,
    i installed the ipc pack­age after get­ting the ipc-error but now i get this message:

    perl –Iextlib –MIPC::Run –e 1
    Can't locate fields.pm in @INC (@INC con­tains: extlib /opt/KQperl/lib/sun4-solar
    is/5.00405 /opt/KQperl/lib /opt/KQperl/lib/site_perl/sun4-solaris /opt/KQperl/li
    b/site_perl .) at extlib/IPC/Run.pm line 1075.
    BEGIN failed – com­pi­la­tion aborted at extlib/IPC/Run.pm line 1124.
    BEGIN failed – com­pi­la­tion aborted.

    I dont have any idea where this "fields.pm" should be or come from, do you?

    Greet­ings Nana

  • http://sniptools.com snip­tools

    Hi nana,

    The good news is that this is not a grave issue, my guess is that it's got some­thing to do with your Perl ver­sion. Fields.pm is an impor­tant "pragma" for doing OOP in Perl. Can you run this at your shell prompt…

    perl –v

    …and let me know which ver­sion it is? Also, if you know, what OS (and ver­sion) are you using?

    Shanx

  • nana

    Hi Shanx,

    thank you for answer­ing so quickly, my com­puter crashed so i couldnt come back faster.
    I ran the com­mand and it gave me this:
    this is perl, ver­sion 5.004_05 built for sun4-solaris.
    Actu­ally i am rent­ing the server­space and i dont know what sys­tem they are running.

    Greet­ings Nana

  • http://sniptools.com snip­tools

    Nana, your Perl ver­sion is bor­der­line ok, as per the require­ments accord­ing to MT. Actu­ally, my bad, your first error mes­sage does say that it is Perl 5.00405)

    I guess this is a mes­sage you may have to show to your server host, and ask them why you don't have access to Fields.pm. It depends on how they may have com­piled Perl on the server for you. Just FYI, the lat­est ver­sion of Perl is 5.8.3, which is a LONG way off from the Perl ver­sion you seem to have.

    Let me know what they say.

    Cheers, Shanx

  • http://www.adammessinger.com/archives/indiv/blogging/000033.html 8 Ways to Sunday

    MT Pho­to­blog Thumb­nail­ing With­out ImageMagick

    Prob­lems using ImageMag­ick to gen­er­ate thumb­nails lead me to find a new way to process images in Mov­able Type…

  • http://www.dave.englund.name Dave Englund

    I installed NetPBM to my MT con­fig­u­ra­tion as per the instruc­tions. I also installed the "IPC:Run" components.

    Now when I upload an image file to my pho­to­blog I get the MT dia­log which asks if I want a thumb­nail image in addi­tion to the popup or embed choice. So far so good.

    After select­ing the thumb­nail option, cre­ate a new entry and select­ing the embed­ded image option and click­ing OK, I got an error page with the fol­low­ing information…

    ++++++++++++++++++++++++++
    An error occurred:

    exec failed: Per­mis­sion denied at lib/MT/Image.pm line 126 at lib/MT/Image.pm line 126 exec failed: Per­mis­sion denied at lib/MT/Image.pm line 126 at lib/MT/Image.pm line 126
    ++++++++++++++++++++++++++

    Any ideas as to why I'm get­ting this error?

  • Matt

    I fol­lowed your instruc­tions. My MT is installed in the cgi-bin, so I wasn't sure where to put the NetPBM bina­ries so I put them in a folder /public_html/mt-static. I did chmod them at instructed. Uploaded as binary.

    I put the IPC tools in the /cgi-bin/extlib/IPC direc­tory, uploaded all as ascii.

    When the soft­ware goes to make the thumb­nail, I get this error:

    MT::App::CMS=HASH(0x83593c8) Use of unini­tial­ized value in length at extlib/IPC/Run.pm line 3197.

    I uploaded the Run.pm file three times just to make sure it made it. Any idea what's caus­ing the error?

  • http://sniptools.com snip­tools

    Matt, did you change your MT.CFG file to spec­ify the paths of NetPBM (Step 5 of above article)?

    Sec­ond, what do you see when you exe­cute IPC test­ing com­mand (Step 6 of above arti­cle) on your shell prompt?

    Third, what hap­pens if you down­load the more recent IPC files from CPAN?

  • Matt

    Yes, I con­fig­ured the MT.CFG file cor­rectly. I do receive the option to make a thumb­nail after I upload a picture.

    I receive the fol­low­ing out­put:
    Can't locate IPC/Run.pm in @INC (@INC con­tains: extlib /usr/lib/perl5/5.6.1/i686-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i686-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .).
    BEGIN failed – com­pi­la­tion aborted.

    After I uploaded the new IPC files I no longer get the option to make a thumb­nail. It seems to have dis­abled it somehow. :(

  • Kinuk

    This is a fan­tas­tic tuto­r­ial. Thanks very much for writ­ing it.

    I've installed NetPBM in the http­docs. I've also installed IPC after the thumb­nail­ing didn't work.

    My worry now is that I've got the wrong ver­sion of NetPBM. When I used "dig this" at the top of the page, I get the fol­low­ing information:

    Apache /1.3.27 ( Unix ) Python .org/'>mod_ Python /2.7.8 Python /2.2.2 mod_gzip /1.3.19.1a mod_perl /1.27 mod_throttle/3.1.2 PHP /4.3.2 Front­page /5.0.2.2510 mod_ssl /2.8.14 OpenSSL /0.9.7c

    So, as far as I know (and I don't know much) my server uses Unix, specif­i­cally Apache. When I go to search for a NetPBM ver­sion for Apache or Unix, I can­not find one. Plenty of Linux, yes…

    Is there any­thing else that I can do?

    Btw, I did mod­ify mt.cfg, as stated in the tutorial.

    Any insight into this will be greatly appreciated.

  • http://sniptools.com snip­tools

    Kinuk, do you get any errors with NetPBM? Just won­der­ing: if it works why fix it with the lat­est ver­sion? What UNIX are you using — your web host should be able to tell you that. Once you know, just the the appro­pri­ate libraries from here for that OS (http://netpbm.sourceforge.net/). Apache has noth­ing to do with it.

  • Michael

    Hello. Great tuto­r­ial. I have fol­lowed it too many times now and unfor­tu­nately no success :(

    My envi­ron­ment:

    OS: Redhat/Linux
    Perl: 5.6.1
    MT: 2.661
    MT dir: /var/www/html/blog
    MT.cfg in: /var/www/html/blog/cgi-bin
    netpbm in: /var/www/html/blog/cgi-bin/netpbm
    IPC in: /var/www/html/blog/cgi-bin/extlib/IPC

    Using IPC ver­sion 0.75 I get noth­ing when I run
    perl –Iextlib –MIPC::Run –e 1 in both the cgi-bin direc­tory and the cgi-bin/extlib directory.

    How­ever, MT still does not dis­play a thumb­nail option when upload­ing files.

    Using IPC veri­son 0.78 I get the fol­low­ing error:

    Can't locate IPC/Run.pm in @INC (@INC con­tains: extlib /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.6.1/i386-linux /usr/lib/perl5/vendor_perl/5.6.1 /usr/lib/perl5/vendor_perl .).
    BEGIN failed – com­pi­la­tion aborted.

    Any sug­ges­tions for what I might try next would be greatly appreciated.

    Thank you.

  • http://sniptools.com snip­tools

    Hi Michael,

    What hap­pens if you move the whole IPC folder to:

    –> /var/www/html/blog/extlib/IPC

    Let me know.

    Shanx

  • Michael

    Well I moved IPC to /var/www/html/blog/extlib/IPC
    and I can run perl –Iextlib –MIPC::Run –e 1 in both the /var/www/html/blog and /var/www/html/blog/extlib direc­to­ries with­out error.

    How­ever, there is still no thumb­nail option when upload­ing images in MT :(

    Note: the extlib sub­di­rec­tory was added to /var/www/html/blog merely to fol­low your sug­ges­tion, it pre­vi­ously did not exist

    Maybe it would help­ful if I described the con­tents of /var/www/html/blog and /var/www/html/blog/cgi-bin

    /var/www/html/blog con­tains all the blog's html, tem­plates, style sheets and syn­di­ca­tion feeds.

    /var/www/html/blog/cgi-bin con­tains mt.cfg, cgi files, lib, tmpl, and well basi­cally every­thing else.

    Is there any chance that if my host has NetPBM installed else­where there would be a con­flict and thus MT is bypass­ing the thumb­nail feature?

    Any fur­ther assistance/suggestions would be greatly appreciated.

    Thanks.

    –Michael

  • Michael

    Wow!!! It finally is work­ing! Thanks for the tutorial!

    Turns out I had to declare the path name to NetPBM from the root of server in the con­fig­u­ra­tion file. Else­where in the file I only declare paths from the root of my account. Oh well, it works!

  • http://sniptools.com snip­tools

    Glad to hear that Michael. The next thing I was going to sug­gest was to con­firm your cfg file. Any­way, all that ends well..

  • gatta

    for those of you who use netpbm & expe­ri­ence this after press­ing "popup" or "embed" butto:

    Bro­ken pipe: write ((gib­ber­ish gib­ber­ish gib­ber­ish lots and lots of gibberish))

    It's prob­a­bly because that pro­grams like jpeg­topnm fails to run (libraries link­ing prob­lems). try do a ldd on jpeg­topnm and you may see that it can't find some libraries.

  • chris

    Grrr!
    I've read the post, read all the com­ments, fol­lowed all directions.

    I do not receive the IPC error, it's just that noth­ing has changed in my upload options at all. Exactly the same. No option for thumbnailing.

    I've changed my cfg file, I've set per­mis­sions on the bina­ries, I've done it all. Grrr.

    The only thing I could not do was check the bina­ries in my "shell". In fact, I don't even know what that means!

  • chris

    Turns out my solu­tion was the same as Michael's. I thought I'd tried that, but I guess not! Path to NetPBM from the root of the server…

    Thanks for this tuto­r­ial. I can't wait to get going.

  • Yoto

    After read­ing this fine tuto­r­ial and doing it more than 40 times and read­ing every­one com­ments i give up :( My MT refuses to show the Thumb­nail option when i upload a image :(

    Just to get this clear i did install NetPBM in my pub­lic html direc­tory (who is called sim­ple "www")and chmod it 755. My final path is this one:

    /www/NetPBM

    Next i have edited MT.CFG and changed the lines "ImageDriver NetPBM" (i sim­ple removed the #) and changed the NetPBM­Path to NetPBM­Path /www/NetPBM/ (also remov­ing the #)

    Since i don’t have shell access i tried to do an upload of a pic­ture… And them noth­ing :( No Thumb­nail option :(

    I checked if my web­serve had IPC::Run perl mod­ule and since it doesn’t i have installed it on the /cgi-bin/MT/extlib/ folder hav­ing in the final this folder /cgi-bin/MT/extlib/IPC

    And still noth­ing :( I also have checked my full paht to my server (in this case /mnt/web_j/d40/s40/a000k508/www) and changed the NetPBM­Path to /mnt/web_j/d40/s40/a000k508/www/NetPBMPath and still no luck :(

    I'm almost giv­ing up and i hope some one can see what I’m doing wrong and tell me…

    Btw, my MT ver­sion is 2.64.

    Thansk!

  • http://sniptools.com snip­tools

    Yoto, what hap­pens when you remove the last slash from your "NetPBM­Path /www/NetPBM/" ?

  • Yoto

    Hi Shashank!

    If i remove the slash i still don't get the thumb­nail option… i also did the same thing using full NetPBM­Path /mnt/web_j/d40/s40/a000k508/www/NetPBM and it also didn't show the option :(

    Btw, thanks for you help :)

  • Mor­gan

    I wish I found this tuto­r­ial 10 hours ago. I've been sit­ting here all day frus­trated beyond belief because I couldn't get Image::Magick or my NETPBM file's to work.

    THANK YOU SO MUCH!!

  • Jonny

    Thanks for this! This site comes up nicely on Google when you search for Mov­able Type & NetPBM so found it eas­ily and got it all work­ing within five minutes!

    Thanks from the UK!

  • Don­ald Kramer

    Image::Magick on Win­dows and MT: As it said on the old Image::Magick Perl site the direc­tory where the DLLs are located is finicky. Try copy­ing all of the DLLs into C:\Perl\site\lib\auto\Image\Magick or just C:\Perl it should work fine

    http://www.dylanbeattie.net/magick/debug.html

    quite pos­si­bly it is the same issue with Unix as well, per­haps the exe­cuta­bles must also be located in the asso­ci­ated direc­tory. Just a thought.

  • ChrisWDP

    I've been try­ing to get NetPBM to work on a Win­dows 2003 server. I have fol­lowed the instruc­tions and I am receiv­ing the fol­low­ing errors when I run #6:

    Pro­to­type mis­match: sub Socket::IPPROTO_TCP > vs none at C:/Perl/lib/Socket.pm line 395

    Pro­to­type mis­match: sub Socket::TCP_NODELAY > vs none at C:/Perl/lib/Socket.pm line 395

    If I try to upload a pic­ture in MT, this mes­sage shows under the two but­tons for pop-up and embed­ded image.

    Any ideas on what is caus­ing this? Thanks.

  • orange­guru

    Thanks for the great tuto­r­ial. Too bad I can't check if MT find netpbm (no shell access).

    So I installed IPC::Run as well. Still no luck.

    mt-medic at least says the con­fig is ok, the paths and per­mis­sions are fine as well.

    MT 3.121 really 'breaks' a lot of things that have been work­ing per­fectly with MT 2.61 — includ­ing image upload and XML-RPC (I had to install SOAP lite — grrrrrr!).

    Once again thanks!

  • Feri

    Thanks for your per­fect instruc­tions. I just install it on Mt 3.121 with IPC folder. Every thing is fine and I have my Thumb­nail as well. But at the bot­tom of the pop-up win­dow, there is an unlim­ited line of errors like these:

    Pseudo-hashes are dep­re­cated at extlib/IPC/Run.pm line 2452.
    Pseudo-hashes are dep­re­cated at (eval 14) line 68.
    Pseudo-hashes are dep­re­cated at extlib/IPC/Run/IO.pm line 556.
    extlib/IPC/Run/IO.pm line 563.
    Pseudo-hashes are dep­re­cated at extlib/IPC/Run.pm line 3003.

    Any sug­ges­tions to solve this?

  • http://www.panlux.com/archives/000029.html Pan­lux — Con­verg­ing Media — Weblog

    Thumb­nail­ing with NetPBM and Mov­able Type

    Tuto­r­ial NetPBM mit Mov­able­type Wer statt Image::Magick das Perl Modul NetPBM ver­wen­den will wird hier glck­lich werden.…..

  • Arthur Che

    Hi,

    I read your very use­ful tuto­r­ial about MT and NetPBM. I've fol­lowed all the instruc­tions, and now I get it to let me try and cre­ate a thumb­nail, but when I click "pop up image" or "embed­ded image," I get the Bro­ken Pipe error that a few on the thread have got­ten. Do you have any idea for a fix for this? Any help is greatly appreciated!

    Thanks :)


    Arthur Che
    [email protected]
    http:// http://www.arthurhungry.com /

  • jummy

    I'm utterly frus­trated that your straight­for­ward instruc­tions don't seem to help me. I emailed you, Shanx, and I hope you have a chance to respond to me some­time soon.

    Many thanks.

  • Jonathan

    My host said "netpbm is install and all com­mands are in /usr/local/bin," yet when I take out the #'s in the mt.cfg file, I receive the fol­low­ing when try to access mt.cfg.

    Got an error: ./mt.cfg:317: vari­able 'NetPBM' not defined

    What's that about?

  • Jonathan

    Sorry, I meant when try­ing to access http://www.shrued.com/mt.cgi

  • Alius Max­imus

    Hello Shashank and thanks for this usu­full tuto­r­ial, I don't know if you still answer to the prob­lems con­cern­ing this tuto­r­ial or not, but I have to try anyways!

    I have done all what you said (except the 6th one because I don't have Shell access to my server), Now I can see thumb­nail choice in upload image popup but when I click thumb­nail it gives me this error message:

    exec failed: Per­mis­sion denied at lib/MT/Image.pm line 126 at lib/MT/Image.pm line 126 exec failed: Per­mis­sion denied at lib/MT/Image.pm line 126 at lib/MT/Image.pm line 126

    I saw that some­one else had the same prob­lem but couldn't find any answer from you in the com­ments. would be really grate­full if you can help me in this regard…

    thanks again
    cheers

  • Runa

    Hello there Shashank:

    I tried to install the NetPBM tool fol­low­ing your instruc­tions but it does not work. I am run­ning MT 3.16 with dynamic pub­lish­ing on a Win­dows 2003 Server, run­ning php.

    In the mt.cfg file, here is what I have:

    ImageDriver NetPBM
    NetPBM­Path /cgi-bin/mt/netpbm

    Should I have uploaded the NetPBM files to /mt-static, which is out­side the cgi-bin folder, instead of the above?

    I have also uploaded the IPC files to:

    /cgi-bin/mt/extlib/IPC

    Then in /cgi-bin/mt/ I ran this command:

    perl –Iextlib –MIPC::Run –e 1

    and this is the error I get:

    Pro­to­type mis­match: sub Socket::IPPROTO_TCP > none at c:/Perl/lib/Socket.pm line 395.

    Any help will be much appreciated.

    Indebted to you.

    –R.

  • http://sniptools.com snip­tools

    Hello Runa, what ver­sion of Perl are you using?

  • Runa

    Hello Shashank:

    Perl ver­sion: 5.8.6

    –R.

  • http://sniptools.com snip­tools

    Hi Runa,

    Those are warn­ings rather than errors. Do they block NetPBM from work­ing at all?

    [Rant]This Socket.pm prob­lem is one of the many rea­sons Perl is a PITA and many peo­ple use the ilk of PHP. [/Rant]

    I frankly don't have time to help out any more, but a mean­ing­less ques­tion — have you tried Image::Magick? It could be a lot sim­pler yet help you do what­ever you want to do with NetPBM.

    Shashank

  • Chris Henry

    Excel­lent tuto­r­ial. Was able to get this up and run­ning on my site in min­utes, after spend­ing hours tring to get ImageMag­ick to work.

    Thanks a ton!

  • Math­ieu

    I seem to be get­ting the same error as Green­lan­der and sam !

    I get the thumb­nail option to show up now, but when I hit “popup” or “embed” the next screen I see is:
    Bro­ken pipe: write ((gib­ber­ish gib­ber­ish gib­ber­ish lots and lots of gib­ber­ish))
    at extlib/IPC/Run/IO.pm line 582

    Any thoughts for this unre­solved prob­lem?
    Thanks a lot !

  • http://www.baviaan.net George

    Works like a charm. Thanks a lot! Great work.

  • http://www.nidiaberenice.com Nidia Berenice

    hello
    your post are very coool
    i install net­pdm in 20 min.

    works really good.

    very thks.

  • Jay Brewer

    Wow. This worked like a charm. The big thing — putting the two lines inthe mt.cfg file on two lines.

    mageDriver NetPBM
    NetPBM­Path /cgi-bin/mt/netpbm

  • andy

    Hey these instruc­tions helped a lot. Thanks!

  • Mike

    Still work­ing like a champ!!! Had to do the IPC part, and it imme­di­ately fixed it!

    Thanks a ton!

  • http://www.normalamerica.com Nick G

    Thank you so so much. It took some mon­key­ing around but, I finally got the sucker installed right. I have two ques­tions for you though:

    1.) Are there any fea­tures in netpbm that will allow the user to look at a pre­view of the thumb­nail before they upload it, I'd think it would be ideal to get a pre­view func­tion, cause as it is now, I am really guess­ing on the right per­cent­ages of my thumbnails.

    2.) Do you mind if I link to your down­loads link to the netpbm zipped file, if you do would you mind if I uploaded the file to my own server and let them down­load it from there. Pretty much the sit­u­a­tion is, I have just started mess­ing around with MT and fig­ured as I fig­ured out cer­tain things I'd post blog/tutorials on the very same blog I was work­ing on. I'd give the link to this arti­cle if you wanted, I just wanted to get the ok, don't wanna step on anybody's toes.

  • Nick

    Thank you so so much. It took some mon­key­ing around but, I finally got the sucker installed right. I have two ques­tions for you though:

    1.) Are there any fea­tures in netpbm that will allow the user to look at a pre­view of the thumb­nail before they upload it, I'd think it would be ideal to get a pre­view func­tion, cause as it is now, I am really guess­ing on the right per­cent­ages of my thumbnails.

    2.) Do you mind if I link to your down­loads link to the netpbm zipped file, if you do would you mind if I uploaded the file to my own server and let them down­load it from there. Pretty much the sit­u­a­tion is, I have just started mess­ing around with MT and fig­ured as I fig­ured out cer­tain things I'd post blog/tutorials on the very same blog I was work­ing on. I'd give the link to this arti­cle if you wanted, I just wanted to get the ok, don't wanna step on anybody's toes.

  • http://sniptools.com snip­tools

    Nick, sure, you can link to the arti­cle and make the zipped file downloadable.

  • Lau­rea

    Your plug-in works great! I was able to install it suc­cess­fully. Thanks for the tutorial!

    I do won­der though if there is a way to cus­tomize NetPBM so that it gen­er­ates the thumb­nail image code and then *inserts the code into the entry* so that you don't have to to click "show me the html."

    I know that click­ing "cre­ate new entry" inserts the thumb­nail image code into the entry, but lets say you want to upload mul­ti­ple pic­tures into the same entry and you want the code for each thumb­nail image you upload to be inserted into the entry.

    Is there a way to cus­tomize NetPBM do what i described above?

    A live exam­ple of this descrip­tion would be in Type­pad. When you insert an image in a post, the image code is inserted for you into the entry, and you can upload mul­ti­ple images and Type­pad con­tin­ues to insert the image code for each image uploaded into the sin­gle entry.

    I would appre­ci­ate any point­ers or resources to check out.

    Thanks!

  • http://www.google.com/url164 Jane

    At you the excel­lent site, a lot of use­ful info and good design, thank.

  • ulrika

    Arrghhh
    I used your instruc­tions with ulti­mate succ­sess on my OLD MT instal­la­tion.
    Then I installed 3.2 and.….well Net Pbm DOES NOT work in that either.…!! So I tried first with MT s solu­ton (only IPC) bro­ken pipe– I did your solu­tion with new files and all an I get bro­ken pipe12. I really have tried every­thing, checked that I didn't di any mis­takes in mt.cfg or what­ever, and uploaded fresh files again in binary mode etc etc.
    IS there any­thing else I could do?
    Does NOBODY really know what is wrong? In this?
    Hope­ful
    u

  • http://www.bivald.com Niklas Bivald

    When using NetPBM and png's you need to change line 1xx (122 I think) in Image.pm:

    my %Types = (jpg => 'jpeg', gif => 'gif');

    To

    my %Types = (jpg => 'jpeg', gif => 'gif', png => 'png');

    Oth­er­wise you will might get a "file not found: /users/home/etc/netpbm/topnm"

    http://forums.sixapart.com/index.php?showtopic=54246 >

  • http://www.krimzon.net aidan

    this worked per­fectly, thanks!

  • http://www.justinkalweit.com Justin Kalweit

    Thanks, worked great on the jumpline red­hat VDS servers!

  • http://www.mcgiver.d2g.com Phill Mayer

    I fol­lowed these instruc­tions to get NETPBM work­ing, but I messed up somewhere

    Here is the mt-config:

    ImageDriver NetPBM
    NetPBM­Path http://76.124.218.15:1226/cgi-bin/mt/netpbm

    The NetPMB folder is in the cgi-bin\mt\forlder

    IPC is in the mt/extlib folder
    IPC is in the perl/site/lib folder
    IPC is in the perl/lib folder

    When I run perl –Iextlib –MIPC::Run –e 1
    I get pro­to­type mis­match errors

    When I try to upload an image, I get no option to cre­ate a thumbnail.

    What am I doing wrong?