a) is mogrify in /usr/pkg/bin (could you just execute it as mogrify?)
b) is $safe_path the path to an image, or the directory they are in, if it is the directory, if it is the directory do you need to call mogrify on each individual image instead?
c) do you need to specify the type of the images ( ps:image )
d) try this code:
[php]
$erroroutput = `/usr/pkg/bin/mogrify -scale 150x150 -quality 100 $safe_path`;
if ($erroroutput != "") { echo($erroroutput); }
[/php]
(if none of this works, try it one image at a time, i don't know if mogrify will support an entire folder)
--will