I have the following at the top of every script that runs
PHP inside it
!#!/usr/local/bin/php -e
<?php
(This is on a unix box)
That way, regardless of the extension, the OS knows which
shell(or
interpreter) to load
Nige.
> -----Original Message-----
> From: magick-users-bounces imagemagick.org
> [mailto:magick-users-bounces imagemagick.org]On Behalf
Of Alon
> Sent: Tuesday, 24 October 2006 12:19 PM
> To: magick-users imagemagick.org
> Subject: [magick-users] exe() of PHP to run composite
>
>
> Hi All,
>
> For the past two years I had a script that a friend of
mine
> helped me to set along with some server settings.
>
>
> $cmd="composite -gravity center -size 450x337
-geometry
> 450x337 +profile '*' -sharpen 0x1 'test.jpg' -size
450x337
> xc:white output.jpg";
> exec("$cmd 2>&1");
>
>
> However, I had to switch severs, and now I can't get
this
> script to run through PHP.
>
> I can run this script as ROOT from the command line,
and it works.
>
> But,. with PHP, it doesn't run anymore.
>
> Any pointers?
> # less test.php
> <?php
> $cmd="composite -gravity center -size 450x337
-geometry
> 450x337 +profile '*' -sharpen 0x1 'test.jpg' -size
450x337
> xc:white output.jpg";
> exec("$cmd 2>&1");
> ?>
>
> When I run it at user level:
>
> php test.php
>
> It runs fine and creates the output.jpg file with the
user's
> ownership which is fine.
>
> But, when I try to initiate this through Apache (i.e.
from a
> URL link), it doesn't run.
> I tried to change ownership to apache.apache, but it
didn't help.
> So,. if you any pointers on how to make this script run
NOT
> from a SHELL script, but from HTTP, I would be very
happy to
> hear about this.
>
> Thanks,
>
> -Alon.
> _______________________________________________
> Magick-users mailing list
> Magick-users imagemagick.org
> http://studio.imagemagick.org/mailman/listinfo/magick
-users
>
_______________________________________________
Magick-users mailing list
Magick-users imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
|