472,972 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,972 software developers and data experts.

exec w. imagemagick gives incomplete result

Hi. Trying to generate some images with imagemagick. The following
works on
the command line:

/usr/local/bin/convert xc:yellow -resize 100x15! -gravity "West" -draw
"text 0,0 'Path Two'"
/Users/morten/Sites/cebra/images/a1a2e65dce30f01861c60d0acb5287c7.jpg

But when running via PHP exec, the yellow box gets created alright,
but the text doesn't
show.

exec($CONVERT." -font helvetica xc:yellow -resize 100x15! -gravity
\"West\" -draw \"text 0,0 \'".$text."\'\" ".$file, $out, $err);

Any suggestions?

Thanks.

Morten
Jul 17 '05 #1
2 3531
Morten wrote:
But when running via PHP exec, the yellow box gets created alright,
but the text doesn't show. exec($CONVERT." -font helvetica xc:yellow -resize 100x15! -gravity
\"West\" -draw \"text 0,0 \'".$text."\'\" ".$file, $out, $err); Any suggestions?


Try echo instead of exec

echo $CONVERT." -font helvetica xc:yellow -resize 100x15! -gravity
\"West\" -draw \"text 0,0 \'".$text."\'\" ".$file;
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Jul 17 '05 #2
Pedro Graca <he****@hotpop.com> wrote in message news:<br************@ID-203069.news.uni-berlin.de>...
Morten wrote:
But when running via PHP exec, the yellow box gets created alright,
but the text doesn't show.

exec($CONVERT." -font helvetica xc:yellow -resize 100x15! -gravity
\"West\" -draw \"text 0,0 \'".$text."\'\" ".$file, $out, $err);

Any suggestions?


Try echo instead of exec

echo $CONVERT." -font helvetica xc:yellow -resize 100x15! -gravity
\"West\" -draw \"text 0,0 \'".$text."\'\" ".$file;


And pasting the result of echo into a term works. I've found that this is
highly likely to be due to imagemagick convert invokes another executable
which is in /usr/local/bin and this path is not part of the PATH visible
to PHP (according to phpinfo()). How do I add it?

Thanks,

Morten
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: PeterF | last post by:
Hi, I've got the following problem: exec() and shell_exec(), etc. don't give anything back, just the error code 127 (command not found?!) For example, the following script: <?php exec("cat...
4
by: Andrew Crowe | last post by:
Hi guys, I'm having trouble executing commands using exec() or system() that need to write files. I've set the permissions on CMD.EXE but I can't use exec() to write any files, even if the...
1
by: Geoff Soper | last post by:
I'm using ImageMagic under UNIX via the exec() function. I'm using it to ascertain the dimension of JPEGs. The code which is causing problems is below, I've used debugging code to try and work out...
0
by: Andrew Crowe | last post by:
Hi guys, I'm having some trouble using the exec() command on a Windows 2000 / IIS server (PHP5rc2 running as ISAPI). I can execute programs fine, but they are unable to interact with any files...
3
by: Joe | last post by:
Hey I have tried to install ImageMagick on my server, but my apache stalls when i try to start it with the following line added to my php.ini file: extension=php_imagick.dll I can't even...
4
by: Andrew Crowe | last post by:
Hi guys, I'm using ImageMagick to do scaling / filtering to uploaded images by calling the following: exec("cmd.exe /c convert.exe -filters in.jpg out.jpg"); This works flawlessly on our...
3
by: news | last post by:
My Web host apepars to not allow exec() and system(), as a line in my script: system("convert -scale 100x100 $uploadfile $toimage"); gives the error: "Warning: system() has been disabled...
3
by: ajh | last post by:
Using Ubuntu 5, Apache2 and PHP 4 I am trying display in a web browser the output from a program I wrote in C. Here is an abridged version of my code (I can post all of it later): <?php ...
6
by: Jeff | last post by:
I need to rewrite some image resizing code from perl to php. Although I'm currently using Image Magick in perl, the function reference is so different, that I'll completely need to rewrite it....
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.