I want to port my application, which runs fine under OS X, to Windows7. I have 
a PHP startup script, which launches httpd as follows:

  // Now attempt to start apache

  $cmd = '/usr/sbin/httpd -f "/path/to/my/config/file" 2>&1';
  exec ($cmd, $results, $result);

  if  ($result!=0)
       {
       // Print contents of $results array and then exit
       }

  // Success in starting apache, carry on and do the next thing


Doing the above appears to satisfy these requirements:

1) start it in the background
2) redirect stderr to stdout so that any startup errors (e.g. bad config items) 
get picked up and returned in $results in case of startup failure

What I'd like to know is whether the redirection is organised by the OS or by 
apache itself - so do I do the same as above to pick up any stderr output from 
apache under Win7, or is there a different mechanism?

Secondly, is (1) above satisfied because httpd, itself, relinquishes the 
console and puts itself in the background at successful startup, or is it a 
side-effect of putting 2>&1 in the above?

--
Cheers  --  Tim

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to