On Tue, 30 Oct 2001 16:05:42 -0000, Brian Aitken wrote:
>Hiya
>
>I need to be able to automatically change the format and size of an
>image
>when a user uploads it and using imagemagick's tools seems like the
>way to
>go about it.
>
>Unfortunately the server I'm using is Windows based and it doesn't
>have
>imagemagick installed.  I downloaded the Windows imagemagick
>binaries and
>the tools work fine locally from the dos prompt.
>
>I hoped that uploading these files to a directory on the server
>would allow
>my PHP script to use the tools, but either I'm typing in the wrong
>commands
>or the tools won't work on the server.
>
>When I try this little test script:
>*****
>
>$file1 = "\\images\\gladius.tiff";
>$file2 = "\\images\\gladius.jpg";
>
>$command = "\\imagemagick\\convert ".$file1." ".$file2;
>$result = system($command);
>if ($result)
>{
> echo("Conversion Done!<br><img src = gladius.jpg>");
>}

it looks like you're getting the path wrong.
try it like this:

echo `c:\\imagemagick\\convert c:\\images\\gladius.tiff
c:\\images\\gladius.jpg`;

in unix you can redirect stderr into stdout to see any error messages
like so:
echo `convert $file1 $file2 2>&1';

you can't do this in windows, but I remember finding a dos program
called stderr.exe that you can pipe commands into that does the same
thing.

one possibility that comes to mind is maybe you don't have write
access to the temp directory convert uses.

also try checking apache's error log and posting the results.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to