Page 1 of 1

strange prob with convert and php as frontend

Posted: 2008-12-20T17:44:24-07:00
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 ");
?>

Re: strange prob with convert and php as frontend

Posted: 2008-12-20T18:51:03-07:00
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

Re: strange prob with convert and php as frontend

Posted: 2008-12-20T19:20:47-07:00
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

Re: strange prob with convert and php as frontend

Posted: 2008-12-21T07:16:35-07:00
by cuongvt
Never mind. it was permission problem. :lol:
regards