Hi,
I am running IIS 5 and php 4.2

I will give a lilltle background on what I am trying to do,
I am trying to run a program called convert.exe through php.  This program
will take a jpg and reduce the resolution of the jpg.

The command format the works from the Command Line is:
convert -size 10x10 1.jpg 2.jpg

This will convert 1.jpg to a resolution of 10x10 and create the 10x10 file
called 2.jpg.

I tried different ways and none seem to work, some thing I tried are:

exec("convert -size 10x10 1.jpg 2.jpg");
shell_exec("convert -size 10x10 1.jpg 2.jpg");
exec("c:\picture.bat");     /with picture.bat containing convert -size 10x10
1.jpg 2.jpg


I found on the php.net a sample code of the exec command to display the task
list of XP (this only displayed a blank screen in my browser), this code
was:

<?php
$tlist1 = shell_exec("cmd /c tasklist");
$tlist2 = ereg_replace(" ","&nbsp;",$tlist1);
$tlist = nl2br($tlist2);
echo "<font face=\"Fixedsys\">\n";
echo $tlist;
echo "</font>";
?>



Is there something simple I am missing to run a program through php, any
advise is truly appreciated.

Thanks



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.385 / Virus Database: 217 - Release Date: 9/4/2002



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to