strange prob with convert and php as frontend

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
cuongvt

strange prob with convert and php as frontend

Post by cuongvt »

I'm in freebsd 7.0, imagemagick 6.4.7, php 5.2.8.
If I execute below very simple php script (named 'convert.php') from web-base: http://localhost/convert.php, it not converted image at all,
but if I execute from shell: 'php convert.php', it converted original image for me.
Very strange. Could anyone tell me where's I'm wrong?
Below is my simple php script:
<?php
$im_path="/usr/local/bin";
system("$im_path/convert image.JPG hello.jpg ");
?>
cuongvt

Re: strange prob with convert and php as frontend

Post by cuongvt »

I tried in In centos 5.2 with default installed php 5.1.6, imagemagick 6.2 also.
this script converted image well.
regards
cuongvt

Re: strange prob with convert and php as frontend

Post by cuongvt »

If I slightly modofied as followed, IM can displayed convert image on the web:
<?php
header('Content-Type: image/jpeg');
$im_path="/usr/local/bin";
system("$im_path/convert image.JPG jpg:- ");
?>

But below script still not converted/produced image at all :(
<?php
$im_path="/usr/local/bin";
system("$im_path/convert image.JPG hello.jpg ");
?>
Could anyone know do I missed something?
regards
cuongvt

Re: strange prob with convert and php as frontend

Post by cuongvt »

Never mind. it was permission problem. :lol:
regards
Post Reply