[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] PHP & ImageMagick on a RaQ3



Heya folks,

I'm trying to thumbnail images using imagemagick via php.
So I installed "ImageMagick 5.5.4 02/01/03 Q16" (./configure, make clean, make, make install), and created a php file with this inside:

<?
passthru("/usr/local/bin/convert -size 192x128 my_image.jpg -resize 192x128 thumbsnail.jpg", $handle);
echo $handle;
?>

When I run this php file via a web broswer it returns "'Resource id #2'; resource" but doesn't create the thumbnail. Whats really weird is that when I'm in the shell, if I run this command manually it works fine ! Also, if I run this command from the shell using the PHP Cli ("/usr/bin/php thumbnail_tester.php"), it worked there too.
It only seems to not work if I access it via a browser.

I've set the directory permissions and the source image permissions to 777. I've also tried using the exec, system and popen commands, but none of them seem to work :-(

If I run any other command (like "ls" or something) through this code, they work fine. Does anybody have any idea whats going on here ??
I'm really confused !!

Thanks in advance,
Kameel.