It's always the smallest things that will get you, I should be slapped (preferably by a good looking woman) :) ....
exec was not broken the permissions don't have to be mucked with ownership and group can be left alone this should be stamped on the forehead of each and every PHP developer USE FULL PATHS! $bash = "#!/bin/sh"; $curl = "/usr/local/bin/curl -d \"name=myname&password=mypassword&btnsubmit=submit\" -s -o cdrlist.html https://theserver.com/download/list.html"; $sh = fopen("/var/www/htdocs/rcr/getlist.sh", "w+"); fputs($sh, $bash."\n\n"); fputs($sh, $curl); fclose($sh); chmod("/var/www/htdocs/rcr/getlist.sh", 0755); exec("/var/www/htdocs/rcr/getlist.sh"); This solved all of the problems. I did the full paths thing during the process of elimination, to remove all doubt about the code. This will make sure that the script can be found and executed. On another note; Had I done this with exec and the cURL statement earlier it would have worked as well. But I think that i am going to keep it this way as it will hopefully make the code clearer. I will have to write more cURL statements later in the script and I can then assemble shell scripts as needed. Thanks for all of your help... Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php