php-general | 2001062
Date: 06/29/01
- Next message: Richard Lynch: "Re: [PHP] how to determine size of gz-handler output"
- Previous message: Charles Williams: "Re: [PHP] ADD a user in linux using PHP"
- In reply to: Jeffrey Barendse: "[PHP] PHP & ImageMagick"
- Next in thread: Chadwick, Russell: "RE: [PHP] PHP & ImageMagick"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> In PHP I try to run a shell command with the following source code:
>
> $fotonaam = 'convert -font arial -pointsize 20 -gravity center -fill
> white -draw "text 5,5 VERKOCHT" image.jpg image2.jpg';
> exec($fotonaam);
>
> PHP runs the program but the -draw "text 5,5 VERKOCHT" is not executed
> (there is no VERKOCHT in the image2.jpg). I tried everything but I can't
> solve the problem. Could somebody explain to me how it's possible that the
> program (convert) runs but there (seams to be) a problem with -draw "text
> 5,5 VERKOCHT". If I run the same command troughs telnet/ssh as root or
> nobody it works fine
>
> Is it something with the " and the combinative with the exec function (I
> also tried \")?
>
> Or is it because I run PHP in safe mode and the convert program tries to
run
> a external program what is not in the . path (you now, the basic safe mode
> restriction)?
Probably. Or maybe that program/lib just isn't in PHP's PATH. Try running
it as nobody, but set your $PATH to "" first.
Also, try using the optional parameters to http://php.net/exec so you can
get some feedback from the OS about what error is happening, if any.
-- WARNING richard <email protected> address is an endangered species -- Use ceo <email protected> Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Richard Lynch: "Re: [PHP] how to determine size of gz-handler output"
- Previous message: Charles Williams: "Re: [PHP] ADD a user in linux using PHP"
- In reply to: Jeffrey Barendse: "[PHP] PHP & ImageMagick"
- Next in thread: Chadwick, Russell: "RE: [PHP] PHP & ImageMagick"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

