Page 1 of 1

Urgent! Problem with passthru, system, exec...

Posted: Wed Aug 21, 2002 12:20 am
by slimsam1
Ok, here's the source for my file, written from scratch:

http://houstonhardwoods.guardianhosting.net/image.phps

It's not creating the thumbnails.

Here's a section of it:

Code: Select all

        //passthru("convert $im -sample 231x231 -border 1x1 -bordercolor black $thumbfile");
        //$blah = passthru("convert -scale 50%x50% ".$im." ".$thumbfile);
        //$blah = passthru("convert -size 231x231 ".$im." -resize 231x231 -bordercolor black -border 0x0 +profile '*' ".$thumbfile);
        //$blah = "/bin/sh `convert -size 231x231 ".$im." -resize 231x231 -bordercolor black -border 0x0 +profile '*' ".$thumbfile."`";
        //$blah = "convert ".$im."  -resize 231x231 ".$thumbfile;
        $blah = "cp ".$im." ".$thumbfile;
        //copy($im,$thumbfile);
        //$blah = "mogrify -geometry 231x231 -quality 75 ".$thumbfile;
        passthru($blah);
The passthru using "cp" works, indicating that the permissions are all good.

The convert ".$im."  -resize 231x231 ".$thumbfile one works when I paste it into ssh and run it. So, basically

convert works.
passthru works.
passthru + convert does not work.

Any idea what it could be??
Thank you!

Posted: Wed Aug 21, 2002 12:29 am
by slimsam1
By the way, it gets this error in browser output:

<br>
<b>Warning</b>: readfile("/hsphere/local/home/houstonh/houstonhardwoods.guardianhosting.net/thumbs/item_images_THUMB_0013.jpg") - No such file or directory in <b>/hsphere/local/home/houstonh/houstonhardwoods.guardianhosting.net/image.php</b> on line <b>59</b><br>

Posted: Wed Aug 21, 2002 8:40 am
by enygma
then wouldn't you think that it cant find that image file?
seems pretty simple to me...look at the path there and be sure that that's the right image/location.

Posted: Wed Aug 21, 2002 8:46 am
by llimllib
And, by the way, posting something as urgent will usually get it ignored. In the future, you'll probably want to avoid that.

Posted: Thu Aug 22, 2002 9:15 pm
by slimsam1
Hey, thanks for the replies...


It turns out that I still have no idea why it didn't work-- but I got it working right using GD. The paths/permissions are good (passthru('cp $im $thumbfile'); worked...)

Thanks anyway...

Mike