[magick-users] strange prob with convert and php as frontend
Vu The Cuong
vuthecuong at luvina.net
Sun Dec 21 16:34:59 PST 2008
Thanks. You are right. My careless.
Regards
-----Original Message-----
From: magick-users-bounces at imagemagick.org
[mailto:magick-users-bounces at imagemagick.org] On Behalf Of zentara
Sent: Sunday, December 21, 2008 8:10 PM
To: magick-users at imagemagick.org
Subject: Re: [magick-users] strange prob with convert and php as
frontend
On Sat, 20 Dec 2008 18:22:58 -0800 (PST)
cuongvt <freebsd at vuhanhnhu.com> wrote:
>cuongvt wrote:
>>
>> 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 ");
>> ?>
>Could anyone know do I missed something?
>regards
Hi, I don't use php, but similar problems arise in Perl CGI, where
you can run a script as a user from a shell, but not from the web.
The problem is most likely a permissions problem, where your
web server is running with the absolute lowest permissions, and
it can't run things in /usr/local/bin. This is done, so that anyone
coming
from the outside web, has no permissions except in specially defined
directories which are mode 777. /usr/local/bin is probably 755
Check your web logs for errors. You probably can run convert from
the web server's cgi directory, but it all depends on the web server
configuration
file. You can also do things with "sudo" to allow the nobody:nogroup
webserver
to run things, but it can be dangerous.
Thats my guess, :-)
zentara
--
I'm not really a human, but I play one on earth.
http://zentara.net/Remember_How_Lucky_You_Are.html
_______________________________________________
Magick-users mailing list
Magick-users at imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-users
More information about the Magick-users
mailing list