title: PHP mail() works from command line but not apache
body: <p>I'm trying to figure out why the mail function in PHP fails when called via web browser (i.e. apache), but I can run the same script from the command line using</p>
  
  <blockquote>
    <p>php -f mailtest.php </p>
  </blockquote>
  
  <p>This is one of my client's Fedora servers, so I don't grok it completely, but I do have root access should I need to change anything.</p>
  
  <p>from php.ini:</p>
  
  <blockquote>
    <p>sendmail_path = /usr/sbin/sendmail -t -i</p>
  </blockquote>
  
  <p>Not sure if this could matter, but /usr/sbin/sendmail is a symlink to /etc/alternatives/mta, which is a symlink back to /usr/sbin/sendmail.sendmail. FWIW the apache user does have permission to run sendmail (tested sendmail directly from the command line).</p>
  
  <pre><code>OS: Fedora Core 7 Linux (kernel 2.6.23.17)  
  Apache: 2.2.8  
  PHP: 5.2.6
  </code></pre>
  
  <p>Any help here will be greatly appreciated!</p>