PHP ImageMagik and exec

Discussion in 'Programming/Scripts' started by Brian_A, Apr 3, 2011.

  1. Brian_A

    Brian_A New Member

    Hi,
    I want to execute in php an imageMagik command:-

    convert -font "C:/Windows/Fonts/arial.ttf" -fill "#231112" -pointsize 26 -gravity "Center" -draw "text 0,0 'qZkrndt5'" -rotate 3 C:/wamp/www/security_images_with_php/images/bg3.png C:/wamp/www/security_images_with_php/images/tmp/e7ae97c252a4dd24841a829148ac01c6.png

    I'm using my wampserver for development with ImageMagik installed.

    when I paste this into the cmd prompt it works fine, but when I try in php with

    exec('convert -font "C:/Windows/Fonts/arial.ttf" -fill "#231112" -pointsize 26 -gravity "Center" -draw "text 0,0 'qZkrndt5'" -rotate 3 C:/wamp/www/security_images_with_php/images/bg3.png C:/wamp/www/security_images_with_php/images/tmp/e7ae97c252a4dd24841a829148ac01c6.png');

    I get no result and I cannot for the moment see why. I get no result either on our linux server (with paths modified of course). :(

    Anyone got any tips for this?

    Brian
     
  2. Brian_A

    Brian_A New Member

    Whoops,

    I had just installed ImageMagik but did not reboot, only restarted Apache. After a reboot everything works fine.

    Brian:)
     

Share This Page