Hi People!, this seems like an age old question that just doesnt seem to be able to get solved. I too have a problem calling NT programs from within my PHP script. Hoepfull there is a guru out there who will be able to tell me what i am doing wrong. As the subject states, i am running WinNT4, SP6, IIS4, PHP4. I have a web page that users can use to upload pictures to my server. This script it pasted below <? include "header.inc"; if ($image_name != "") { copy("$image", "../aviation/uploads/$image_name") or die ("Couldn't copy the file."); } else { die("You forgot to add a filename"); } $img_location = "aviation/uploads/$image_name"; $db = mysql_connect("user", "password") or die("Can't connect to server."); mysql_select_db("database", $db) or die("Can't select database."); $insert_data = "INSERT INTO table (image, fname, lname, email, location, rego, remarks, airline) VALUES ('URL/$image_name', '$fname', '$lname', '$email', '$location', '$rego', '$remarks', '$airline')"; mysql_query($insert_data) or die("Couldn't insert data."); system("echo File has been uploaded! | blat - -s \"$image_name uploaded --\" -t $email"); ?> This php file is called from another HTML file. All this info is passed into the database, and at the same time the image itself is copied to another directory on the server. All that works excellently!!!. However, what i want to do is, i want to add some form of compression to the picture (before or after doesnt matter) when it is copied to the directory. The idea behind this is so that when people come to my web site and query the database on pictures, they are compressed a little to save download time. PROBLEM: I have tried all sorts of things from cjpeg/djpeg to trying to call an expternal program called "autobatchit.exe" with the php file to add compression etc. Below is some of the stuff i have tried: // exec("I:\Perl\bin\cjpeg.exe -quality 30 -progressive $image_name"); // exec("c:/autobatchit!/autobatchit.exe"); // exec("c:\autobatchit!\autobatchit.exe"); // exec("c:\command.com /k autobatchit.bat" ); And other variations which i have not added. The results are varying. If i use "cmd" int he exec() anywhere, the script seems to halt at that point and wont go any further. However all of the above lines result in NOTHING happening at all!........if i look at the task manager while i run the script, nithing comes up at all in relation to what i am trying to execute. SO thats about it!!.............the persont hat solves the problem for me gets a free freddo!!! In all honesty i have tried a lot of different stuff that just doesnt seem to work. If anyone can help me out with this i owuld be very appreciative. I have been trying for days to ge tthis working with no luck. It is quite possible that i have missed something very simple as i have only been working with php (or any coding for that matter) for about two weeks now. Thanks in advnace for any help anyone can give me Regards Dave Faulkner -- PHP Windows 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]