Re: fedora core 3 mail() not working from web
| From: | Minuk Choi | Date: | Sat, 27 Nov 2004 21:17:38 +0000 |
| Subject: | Re: fedora core 3 mail() not working from web | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-202971@lists.php.net to get a copy of this message | ||
Thanks Curt.
I decided after a while to chalk this up as incomplete installation of Fedora Core 3, and just removed the Apache-PHP-MySQL RPMs and replaced them with their sources. I compiled them and now everything works!
NOTE: Since re-installing those three fixed the problem, there was no issue with Sendmail, probably just with PHP/Apache.
----- Original Message ----- From: "Curt Zirzow" <php-general@zirzow.dyndns.org>
To: "PHP" <php-general@lists.php.net>
Sent: Thursday, November 25, 2004 2:54 PM
Subject: Re: [PHP] fedora core 3 mail() not working from web
* Thus wrote Minuk Choi:hey gang, I have a fedora core 3, with standard PHP and MySQL included with the distribution. I'm having a rather odd problem. the following script(mailTest.php) <?PHP $result = mail('me@site.com', 'test subject', 'test message'); if (!$result)You're probably on the right track with this. Check your php.ini settings for sendmail_path. Also.. the default setting for sendmail_path is 'sendmail -t -i' so if sendmail isn't in the path for your webuser then it wont get executed. To fix this, specifiy in you php.ini with the sendmail_path the absolute sendmail executable. ie: sendmail_path = "/usr/sbin/sendmail -t -i" HTH, Curt -- Quoth the Raven, "Nevermore." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpecho "FAILURE";elseecho "SUCCESS";?> does NOT work if I access it from the web BUT if I were to execute it as root on the Command prompt php mailTest.php It executes correctly and I get mail. This feels like the apache user is lacking access over sendmail or something... since as root I can execute the script from the CLI without a problem, but from the web, I get a failure.