I start httpd.exe from a PHP script, using this command string on Win7:
start /b /d ...httpd.exe -f myhttpd.conf
This appears to work OK. However, when it comes to stopping it I have an error message. I'm trying initially from the console prompt:
httpd.exe -k stop -f pathtomyhttpd.conf
and the message is:
(OS 5)Access is denied. : failed to open the Apache2.2 Service
What is the right way to do this?