Help on getting IM to work on a windows server
Posted: 2007-10-24T03:06:44-07:00
Hi all,
i am working on a windows server and only have FTP access so i cannot use the console.
The sys admin installed imagemagick on the server for me but i am having trouble getting it to work.
I have tried the following code:
But this ouputs:
Since i do not have access to any log files or some such, i can hardly guess whats wrong.
Is there any way to geta more verbose answer from the server?
Or how do i create a batch script - would a content like "convert filea.jpg filgeb.eps" saved as test.bat be sufficient?
I really need to get this to work quickly but i have no idea where else to look, help pls
i am working on a windows server and only have FTP access so i cannot use the console.
The sys admin installed imagemagick on the server for me but i am having trouble getting it to work.
I have tried the following code:
Code: Select all
<?php
echo "<pre>";
system('which convert', $path);
print_r($path);
echo "</pre>";
exec('convert press_04.jpg -crop 287x163+49+16 graph2.gif');
echo "<br>".print_r($array)."<br>";
exec('convert W:\\www\\kmedev\\press_04.jpg -crop 287x163+49+16 W:\\www\\kmedev\\graph.gif');
echo "<br>".print_r($array)."<br>";
$path = "C:\\Program Files\\ImageMagick-6.3.6-Q16\\";
$cmd = $path . "convert.exe";
exec( $cmd .' W:\\www\\kmedev\\press_04.jpg W:\\www\\kmedev\\graph.gif');
echo "<br>".print_r($array)."<br>";
?>
Code: Select all
<pre>1</pre><br>1<br><br>1<br><br>1<br>
Is there any way to geta more verbose answer from the server?
Or how do i create a batch script - would a content like "convert filea.jpg filgeb.eps" saved as test.bat be sufficient?
I really need to get this to work quickly but i have no idea where else to look, help pls