I am new to CFEXECUTE. I am trying to use cfexecute to restart apache2.2 on max OSX (unix file structure) when a new virtual host is added or when the aliases are updated within a host (eg, new directories are added that must be aliased). Apache doesn't recognize these changes until restart. So I have written code to add the new virtual host/alias settings in the vhosts directory of apache - this is working fine. My challenge is getting cfexecute to restart apache in order to pick up the new configurations. Here is what I have tried:
<!---now set absolute path to a file on the web server to reboot---> <cfset script_path = "/Library/Apache2/bin/apachectl"> <!---now set arguments---> <cfset script_arguments = "restart"> <!---now set absolute path to a file on the web server to act as a log; something like---> <cfset script_log = "/Library/WebServer/Documents/script_log.txt"> <cfexecute name="#script_path#" arguments="#script_arguments#" outputfile="#script_log#"></cfexecute> So, it looks like apache is restarting - the problem I am having is that it tries to spit out the file that the cfexecute is contained in, rather than writing to the file in outputfile. I have manually created the "script_log.txt" in the target directory, and have set permissions to allow the file to be overwritten. But nonetheless, a window pops up asking me to download the file that the cfexecute command is contained in. I have also tried switching from outputfile to variable, and then dumping the variable to a file, but I still have the same problem. To be frank, I really don't need the file, its just a behaviour of cfexecute I need to manage. Any thoughts on why it dumps? I thought of wrapping the cfexecute in cfsavecontent, but don't think I should have to. Cheers, Doug ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289426 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4