title: Is there a PHP function or variable giving the local host name?
body: <p>When a script runs under Apache, I insert <code>$_SERVER['SERVER_NAME']</code> value into an error reporting e-mail message.</p>
  
  <p>However, if a Web script forks a "worker" job with <code>nohup php ...</code>, <code>$_SERVER['SERVER_NAME']</code> appears to be empty there. Thus, if an error occurs, it's reported without a host name.</p>
  
  <p>Can I reliably get the host name by means of PHP, without calling Unix <code>hostname</code> command? </p>