www.webdeveloper.com
Results 1 to 2 of 2

Thread: ImageMagick/exec() problem

  1. #1
    Join Date
    Apr 2003
    Posts
    51

    ImageMagick/exec() problem

    Hi, I'm trying to do a simple resize with ImageMagick's convert -resize this is my script

    PHP Code:
    <?
    $image_path
    ="./img/";
    $thumb_path="./thumb/";

    $image_name="fpoi_highlow2.jpg";

    $command="convert ".$image_path.$image_name." -resize 120x120 ".$thumb_path.$image_name;

    echo(
    $command);
    $error=shell_exec($command);
    echo(
    $error);
    ?>
    Now, if I cut and paste the echoed $command and run it from the command line it works fine. Also there is not error returned from shell_exec but for some reason the script is not working, there is no file in ./thumb after the completion of the script. Any ideas?

    Cheers
    Rob

  2. #2
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    To move up a directory, you use ../, not ./

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles